Hello! I’m new to rstanarm, and even simple calls to stan_glm are failing with somewhat cryptic errors. For example, if I call the first example in the stan_glm vignette:
mtcars$mpg10 <- mtcars$mpg / 10
fit <- stan_glm(
mpg10 ~ wt + cyl + am,
data = mtcars,
QR = TRUE,
# for speed of example only (default is "sampling")
algorithm = "fullrank",
refresh = 0
)
I get the error:
Error in sampler$call_sampler(c(args, dotlist)) :
empty_nested() must be true before calling recover_memory()
Given that this fails, it’s not surprising that I also get errors trying to fit a simple hierarchical model on the Gelman and Hill radon data:
> hierbayes <- stan_lmer(log_radon ~ floor + (1|county), data=radon,
prior = normal(), prior_intercept = normal())
SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.000212 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2.12 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
[1] "Error in sampler$call_sampler(args_list[[i]]) : "
[2] " c++ exception (unknown reason)"
error occurred during calling the sampler; sampling not done
Error in check_stanfit(stanfit) :
Invalid stanfit object produced please report bug
Error in dimnamesGets(x, value) :
invalid dimnames given for “dgCMatrix” object
Does anyone have any idea what’s going on? Nothing seems to be working for me.
- Operating System: Mac OSX 10.15.3
- rstanarm Version: 2.19.2