jameshoward.us
Parallelized Implementation of bootCI for DCchoice
I've been helping a small team work on some willingness-to-pay analysis using double-bounded choice survey data. I'll post more about that soon, but I am writing now to talk about the double-bounded choice models in R. The DCchoice library is really nice and makes the analysis about as simple as possible. Further, the text Stated Preference Methods Using R is fantastic. But...the confidence interval bootstrap routine is really slow with double-bounded choice models. Single-bounded not so much. But it was taking hours to run, even for only 1000 samples. I was using SciServer for running the model and it gives me 16 cores, so I rewrote bootCI to use them all. The script is below and you have to have both doMC and foreach loaded. There's a new option, threads, that allows you to set the total number of threads used.