predict -> posterior_predict breaks old code
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
In 2.9.0-4, it was possible to get an "optimizing-like" prediction with predict. Even if it does not show the full posterior range, it was useful for quick demonstrations of the result, and worked in analogy to lmer (even if for lme4 it needed years of begging to get the equivalent of predict in lme back).
In the 2.10, this is deprecated in favor of posterior_predict, but this makes it very messy to compute one summarizing prediction. There are cases where the full posterior is not required.
Any chance to get some part of the old behavior back? I had to switch to packrat....
Dieter
lat_lme = stan_lmer(newbone ~ treat*weeks +(1| sheep_id), data = lat)
newdata = expand.grid(weeks = c(0,21),
treat = unique(lat$treat),
sheep_id = 1) # sheep_id required as dummy
newdata$pred = predict(lat_lme, newdata = newdata, re.form = NA)
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 by reproducing the supplied stan_lmer and predict example in rstanarm 2.10, comparing it with the described 2.9.0-4 behavior. Determine how a single summarizing prediction can be requested without the full posterior range, then verify that the example works without requiring packrat.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100