## Some code

### Scrambled Sobol' points in R

Scrambled Sobol' points are randomized quasi-Monte Carlo (RQMC) points designed for high dimensional integration problems. For background on QMC and RQMC see the corresponding chapters here and references cited therein.

You will need these three files:
R source code with documentation
generating matrices for up to 50 dimensions
generating matrices for up to 21021 dimensions

Place them in a directory. From within that directory in R type
source('rsobol.R')

Then, for example
rsobol(m=8,s=5) # produces n = 2^8 scrambled Sobol points in s=5 dimensions as an n x s matrix

The generating matrices are from Dirk Nuyens' magic point shop used with permission gratefully acknowledged.

Extra documentation is here.

In published uses, please cite Kuo and Nuyens (2016) as the source of the generating matrices, Joe and Kuo (2008) as the source of the underlying direction numbers and Sobol' (1967) for the underlying construction. The randomization is from Owen (1995). Also included is the randomization from Matousek (1998). That algorithm requires less space but it is widely implemented elsewhere. Computer memory is more abundant now than in the 1990s so saving space is less critical. This code actually re-reads the generating matrices from disk each time a net is constructed. There are faster ways to generate them but this code is fast enough for research use.
Caveat: the Matousek scrambling code only uses that randomization for the first m bits when there are 2**m points to generate. It pastes on a uniform random tail for subsequent bits. It also generates an error for 2 points (i.e., m=1). For that one can take the first 2 points from m=2.

### Sobol' movies

Here are some mp4s showing pairwise projections of the first 30 Sobol' variables. They roll at one projection per second, so they are designed to take 7 minutes 15 seconds.
m=7  n=128   2.1Mb
m=9  n=512   7.0Mb
m=11  n=2048   24Mb
m=13  n=4096   41Mb
m=15  n=32768   255Mb

## Other code

Randomized Halton algorithm in R (PDF)| The R code
Scalable crossed mixed effects Python code on github, by Katelyn Gao.
Empirical likelihood Some R code and pointers to other code.
R code to find the optimal thinning factors for MCMC with AR(1) covariances