Open
Description
On branch develop
(commit 96d8e11), this reprex:
options(mc.cores = parallel::detectCores(logical = FALSE))
nobsv <- 40L
set.seed(1235)
df_gamm <- mgcv::gamSim(eg = 6, n = nobsv, dist = "normal", scale = 0)
df_gamm$wobs_col <- sample(1:4, nobsv, replace = TRUE)
df_gamm$y <- rbinom(nobsv, df_gamm$wobs_col, binomial()$linkinv(df_gamm$y))
fit_gamm_binom <- rstanarm::stan_gamm4(
cbind(y, wobs_col - y) ~ s(f0) + s(f1) + s(f2),
random = ~ (f0 | fac),
family = binomial(),
data = df_gamm,
iter = 500,
seed = 943205
)
library(projpred)
refmod <- get_refmodel(fit_gamm_binom)
throws the following error:
Error in eval(formula[[2]], data, environment(formula)) :
object 'wobs_col' not found