# NOT RUN {
data(algdat.pfull)
## Code to run the simulations in Figure 4 in Fifield, Higgins, Imai and
## Tarr (2015)
## Get an initial partition
set.seed(1)
initcds <- algdat.pfull$cdmat[,sample(1:ncol(algdat.pfull$cdmat), 1)]
params <- expand.grid(eprob = c(.01, .05, .1))
## Run the algorithm
redist.findparams(adjobj = algdat.pfull$adjlist,
popvec = algdat.pfull$precinct.data$pop,
initcds = initcds, nsims = 10000, params = params)
# }
Run the code above in your browser using DataLab