Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.extract_model_data(): Offsets bug #1220

Closed
fweber144 opened this issue Aug 31, 2021 · 1 comment
Closed

.extract_model_data(): Offsets bug #1220

fweber144 opened this issue Aug 31, 2021 · 1 comment
Labels
Milestone

Comments

@fweber144
Copy link
Contributor

Doesn't line

offset <- as.vector(sdata[[paste0("offset", usc_resp)]])
have to read offset <- as.vector(sdata[[paste0("offsets", usc_resp)]]), i.e. with "offsets" instead of "offset"? Otherwise, the offsets are not written to the projpred "refmodel":

library(brms)
set.seed(5687)
epilepsy$offs_col <- rnorm(nrow(epilepsy))
fit <- brm(count ~ zAge + zBase * Trt + offset(offs_col),
           data = epilepsy, family = poisson(),
           chains = 2, iter = 500, seed = 802)
ref <- get_refmodel(fit)
all(ref$offset == 0)

gives TRUE.

paul-buerkner added a commit that referenced this issue Aug 31, 2021
@paul-buerkner paul-buerkner added this to the brms 2.16.0++ milestone Aug 31, 2021
@paul-buerkner
Copy link
Owner

Thanks. Should now be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants