saudiwin / ordbetareg_pack

Repository for R package ordbetareg, used to fit continuous data with lower and upper bounds.
Other
19 stars 3 forks source link

Error running sample code #17

Closed anqizhang1 closed 1 week ago

anqizhang1 commented 1 year ago

Hello Dr. Kubinec,

Thank you so much for the paper and package. It is very novel to me and I am learning from you.

I run into an error running the sample code on https://cran.r-project.org/web/packages/ordbetareg/vignettes/package_introduction.html , I paste it here. When I set run_model to True,

if(run_model) { ord_fit_mean <- ordbetareg(formula=therm ~ mo(education)*mo(income) + (1|region), data=model_data, control=list(adapt_delta=0.95), cores=1,chains=1,iter=500, refresh=0) } else { data("ord_fit_mean") }

It shows error like this.

image

Thank you very much.

saudiwin commented 1 year ago

hi @anqizhang1 - have you tried using/installing cmdstanr? See https://mc-stan.org/cmdstanr/. Then fit the model with the backend="cmdstanr" option. I think what you are seeing is an error with rstan, the default back-end that is a separate R package.

lan-k commented 5 months ago

I had this same error and solved it by installing rstan after ordbetareg

saudiwin commented 5 months ago

yes this isn't an error with ordbetareg, this is an issue with compiling models with rtools on Windows. @anqizhang1 can you try @lan-k solution above?