Error using stan_glmer from rstanarm
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
Summary:
I'm trying to run the MRP demo provided at https://cran.r-project.org/web/packages/rstanarm/vignettes/mrp.html but am getting an error when running stan_glmer().
Description:
I run the same model using the same sample data from the website:
fit <- stan_glmer(
cat_pref ~ factor(male) + factor(male) * factor(age) +
(1 | state) + (1 | age) + (1 | eth) + (1 | income),
family = binomial(link = "logit"),
data = sample
)
but get the following error:
SAMPLING FOR MODEL 'bernoulli' NOW (CHAIN 1).
Chain 1: empty_nested() must be true before calling recover_memory()
[1] "Error in sampler$call_sampler(args_list[[i]]) : " " empty_nested() must be true before calling recover_memory()"
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
I tried re-installing rstanarm using install.packages("rstanarm", type = "source") as suggested in the other post but it did not work.
RStanARM Version:
packageVersion("rstanarm")
[1] ‘2.19.3’
R Version:
Version 1.2.1335
© 2009-2019 RStudio, Inc.
Operating System:
macOS Catalina Version 10.15.5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MRP vignette and reproduce the exact stan_glmer() call using its sample data, recording the reported rstanarm, R, RStudio, and macOS versions. Trace the empty_nested()/recover_memory() failure through the sampling entry point and related error handling; done means a confirmed cause with a clearly scoped fix or user guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100