stan-dev / rstanarm

rstanarm R package for Bayesian applied regression modeling
https://mc-stan.org/rstanarm
GNU General Public License v3.0
385 stars 132 forks source link

Invalid stanfit object produced from stan_betareg... stan_glm worked fine? #576

Open SiegleJ798 opened 1 year ago

SiegleJ798 commented 1 year ago

Summary:

I cannot run stan_betareg. Checked that all y variables are in hte proper support and updated the package. Still doesnt work

Description:

Running : model<-stan_betareg( linformula, link=c('logit'), data=train , model = TRUE, x = TRUE, y = TRUE, contrasts = NULL, weights = Insured.Acres, QR=TRUE, refresh=0, prior= normal(0,2), prior_intercept = normal(0,2) )

[linformula is defined using as.formula to be: PercentLoss ~ LossRatio.11 + ZeroIndemnities.11 + LossRatio.15 + ZeroIndemnities.15 + LossRatio.16 + ZeroIndemnities.16 + LossRatio.41 + ZeroIndemnities.41 + LossRatio.51 + ZeroIndemnities.51 + LossRatio.78 + ZeroIndemnities.78 + LossRatio.81 + ZeroIndemnities.81 + LossRatio.91 + ZeroIndemnities.91 + prec + dday0C + dday10C + dday30C + prec2 + weightCovLevel.84 + totalpolicies | totalpolicies + weightCovLevel.84 ]

gets the error:

[1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed." [1] "error occurred during calling the sampler; sampling not done" Error in check_stanfit(stanfit) : Invalid stanfit object produced please report bug

RStanARM Version:

2.21.3

R Version:

4.2.1

Operating System:

Your operating system (e.g., OS X 10.11.3) Bugdata.csv