Add stochastic survey R code for ms example