LowDiscrepancy           package:fOptions           R Documentation

_L_o_w _D_i_s_c_r_e_p_a_n_c_y _S_e_q_u_e_n_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     A collection and description of functions to compute  Halton's and
     Sobol's low discrepancy sequences,  distributed in form of a
     uniform or normal distribution.  

     The functions are:

       'runif.halton'  Uniform Halton sequence,
       'rnorm.halton'  Normal Halton sequence,
       'runif.sobol'   Uniform scrambled Sobol sequence,
       'rnorm.sobol'   Normal scrambled Sobol sequence,
       'runif.pseudo'  Uniform pseudo random numbers,
       'norma.pseudo'  Normal pseudo random numbers.

_U_s_a_g_e:

     runif.halton(n, dimension, init) 
     rnorm.halton(n, dimension, init)

     runif.sobol(n, dimension, init, scrambling, seed) 
     rnorm.sobol(n, dimension, init, scrambling, seed)

     runif.pseudo(n, dimension, init)
     rnorm.pseudo(n, dimension, init)

_A_r_g_u_m_e_n_t_s:

dimension: an integer value, the dimension of the sequence. The 
          maximum value for the Sobol generator is 1111. 

    init: a logical, if TRUE the sequence is initialized and restarts,
          otherwise not. By default TRUE. 

       n: an integer value, the number of random deviates. 

scrambling: an integer value, if 1, 2 or 3 the sequence is scrambled
          otherwise not. If 1, Owen type type of scrambling is 
          applied, if 2, Faure-Tezuka type of scrambling, is applied,
          and if 3, both Owen+Faure-Tezuka type of scrambling is
          applied. By default 0. 

    seed: an integer value, the random seed for initialization of the
          scrambling process. By default 4711. On effective if
          'scrambling>0'. 

_D_e_t_a_i_l_s:

     *Halton's Low Discrepancy Sequences:* 

      Calculates a matrix of uniform or normal deviated halton low 
     discrepancy numbers. 

     *Scrambled Sobol's Low Discrepancy Sequences:* 

      Calculates a matrix of uniform and normal deviated Sobol low 
     discrepancy numbers. Optional scrambling of the sequence can  be
     selected. 

     *Pseudo Random Number Sequence:* 

      Calculates a matrix of uniform or normal distributed pseudo 
     random numbers. This is a helpful function for comparing 
     investigations obtained from a low discrepancy series with  those
     from a pseudo random number.

_V_a_l_u_e:

     All generators return a numeric matrix of size 'n'  by
     'dimension'.

_N_o_t_e:

     The global variables 'runif.halton.seed' and  'runif.sobol.seed'
     save the status to restart the  generators. Note, that only one
     instance of a generators  can be run at the same time.

     The ACM Algorithm 659 implemented to generate scrambled  Sobol
     sequences is under the License of the ACM restricted  for academic
     and noncommerical usage. Please consult the  ACM License agreement
     included in the 'doc' directory.

_A_u_t_h_o_r(_s):

     P. Bratley and B.L. Fox for the Fortran Sobol Algorithm 659,
      S. Joe for the Fortran extension to 1111 dimensions,
      Diethelm Wuertz for this R-port.

_R_e_f_e_r_e_n_c_e_s:

     Bratley P., Fox B.L. (1988); _Algorithm 659: Implementing Sobol's
     Quasirandom Sequence Generator_, ACM Transactions on Mathematical
     Software 14, 88-100.

     Joe S., Kuo F.Y. (1998); _Remark on Algorithm 659: Implementing
     Sobol's Quaisrandom Seqence Generator_.

_E_x_a_m_p_l_e_s:

     ## *.halton - 
        xmpOptions("\nStart: Uniform Holton Numbers > ")
        par(mfrow = c(2, 2), cex = 0.75)
        runif.halton(n = 10, dimension = 5)
        hist(runif.halton(n = 5000, dimension = 1), main = "Uniform Halton", 
          xlab = "x", col = "steelblue3", border = "white")
        xmpOptions("\nNext: Normal Holton Numbers > ")
        rnorm.halton(n = 10, dimension = 5)
        hist(rnorm.halton(n = 5000, dimension = 1), main = "Normal Halton", 
          xlab = "x", col = "steelblue3", border = "white")
        
     ## *.sobol - 
        xmpOptions("\nNext: Uniform Sobol Numbers > ")
        runif.sobol(n = 10, dimension = 5, scrambling = 3)
        hist(runif.sobol(5000, 1, scrambling = 2), main = "Uniform Sobol", 
          xlab = "x", col = "steelblue3", border = "white")
        xmpOptions("\nNext: Normal Sobol Numbers > ")
        rnorm.sobol(n = 10, dimension = 5, scrambling = 3)
        hist(rnorm.sobol(5000, 1, scrambling = 2), main = "Normal Sobol", 
          xlab = "x", col = "steelblue3", border = "white")
        
     ## *.pseudo - 
        xmpOptions("\nNext: Uniform Pseudo Random Numbers > ")
        runif.pseudo(n = 10, dimension = 5)
        rnorm.pseudo(n = 10, dimension = 5) 

