R and Rstan (v 2.5.0) crashes with optimizing function

38 views
Skip to first unread message

karl.j....@gmail.com

unread,
Dec 1, 2014, 4:50:33 PM12/1/14
to stan-...@googlegroups.com
Hello:
 
1. I am performing multivariate, finite mixture modeling. I use both the optimizing function (to find the mode of the posterior pdf) and the sampling function. When I use Rstan v 2.2.0, both functions work properly. When I use Rstan v 2.5.0 (with the very same code but with re-translation and re-compilation), only the sampling function works properly --- the optimizing function causes Rstan and R to crash.
 
2. Other info
(a) I tried to re-create the crash with a simpler model (namely the eyes example from bugs), but the crashes don't occur. So, I am sending the code that crashes.
(b) I also examined the translated code for the both 2.2.0 and 2.5.0, as well as the difference. However, I don't have enough experience with this translated code to find potential problems
(c) The crashes occur with all three options for the optimizing algorithm ("LBFGS", "BFGS", and "Newton")
 
3. Thank you!
 
Karl Ellefsen
 
 
 
ClusterResult.dat
MixtureModel.R
MixtureModel.stan
cppcode2.txt
cppcode5.txt
diffNice.txt
SynData.dat

Bob Carpenter

unread,
Dec 1, 2014, 5:48:37 PM12/1/14
to stan-...@googlegroups.com
Thanks for the reproducible example.

What R platform are you using (e.g., RStudio on Windows) and is
there any message associated with the crash?

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <ClusterResult.dat><MixtureModel.R><MixtureModel.stan><cppcode2.txt><cppcode5.txt><diffNice.txt><SynData.dat>

karl.j....@gmail.com

unread,
Dec 1, 2014, 5:59:55 PM12/1/14
to stan-...@googlegroups.com
Hi:
 
1. I'm using Rstudio on Windows 7.
2. Rstudio supplies a message --- it is something like "R has developed a problem." And (if I remember correctly) there is a choice: Debug or restart R. (I always restart R.)
3. Also, on the code that I sent you, the mode of the posterior pdf was calculated by a function called Mclust, and is stored in file "ClusterResult.dat" However, I am now using stan to calculate the mode of the posterior pdf. This technical detail may clarify the steps in MixtureModel.R
 
 
Karl Ellefsen
Reply all
Reply to author
Forward
0 new messages