I went through a few BUGS examples in the Stan home page to understand the language better. The change point problem in the Vol2 "stagnant" example is of special interest to me. This example was labeled as an example of "how not to do MCMC." In a previous data analysis work, I used the change point model to analyze similar data for 4 subjects (see attached PDF). I can run the change point model on these subjects individually using Stan (modelfile1.txt and dumpdata1.Rdata). But when I tried to fit a multilevel model (assuming exchangeability on model coefficients) (modelfile2.txt and dumpdata2.Rdata), I got the following error. Thank you in advance for your help.
SAMPLING FOR MODEL 'input.to.bugs$model' NOW (CHAIN 1).
*** caught segfault ***
address 0xb7e92f6c, cause 'memory not mapped'
Traceback:
1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x2806ea0>, dll = list(name = "Rcpp", path = "/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/libs/i386/Rcpp.so", dynamicLookup = TRUE, handle = <pointer: 0x28106c0>, info = <pointer: 0x2ccad0>), numParameters = -1L), <pointer: 0x53a8a40>, <pointer: 0x5385490>, .pointer, ...)
2: sampler$call_sampler(args_list[[i]])
3: .local(object, ...)
4: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, sample_file = sample_file, verbose = verbose, check_data = FALSE, ...)
5: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, sample_file = sample_file, verbose = verbose, check_data = FALSE, ...)
6: stan(model_code = input.to.bugs$model, data = input.to.bugs$data, pars = input.to.bugs$para, iter = n.iter, thin = thin, chains = n.chains)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: