Short summary of the problem
I was running a simple probit regression using rstanarm, but I got the following error message: “Stan model ‘bernoulli’ does not contain samples. Stan model ‘bernoulli’ does not contain samples. Error in check_stanfit(stanfit) :
Invalid stanfit object produced please report bug
In addition: Warning message:In .local(object, …) :
some chains had errors; consider specifying chains = 1 to debug”
When I reran the model with “chains=1”, it retuned the following message:
“SAMPLING FOR MODEL ‘bernoulli’ NOW (CHAIN 1).
Chain 1: Rejecting initial value:
Chain 1: Log probability evaluates to log(0), i.e. negative infinity.
Chain 1: Stan can’t start sampling from this initial value.”
However, when I reran the same model with my own probit regression stan file, it ran just fine. I also didn’t have any issue estimating logistic regression with the same specification using rstanarm. Is this a bug in rstanarm?
The one -line code I used is given below and the data file is also attached. Any insight would be appreciated.affair.csv (10.1 KB)
affair_probit_fit3 <- stan_glm(affair ~ male_dummy + years_married + kids_dummy + religious_dummy + education + mhappy_dummy, family=binomial(link="probit"), data=affair_data, chains=2)
- Operating System:windows10
- rstanarm Version:2.21.3
Don’t forget to add relevant tags to your topic (top right of this form) especially for application area. Delete this text before posting your topic. Thx!
Looking forward to your topic!