I submitted a brm_multiple object to cv_varsel.
A warning appeared during the fitting:
Posterior_linpred (transform = TRUE) is deprecated
Please use pp_expect() instead without the ‘transform’ argument
Quick_TRANSfer stage steps exceeded maximum (= 16000000)
The cvs object was eventually created (long run time - ? 1 hour +)
The cvs object is 3.3 Gb in memory and required 16 Gb to write to disc (Rds object).
Is there an argument in projpred to use pp_expect?
Will this change the cv_varsel run time and the object size?
Code details below.
Nathan
Running in Windows
R 3.6.2
brms 2.12.0
projpred 1.1.6
binary dv; predictors 7 numeric, 11 binary factors
n = 680
Handled missing values by 10 fold multiple imputation (mice)
data = tmp.df.imp
Model estimated with
bprior <- c(prior(student_t(3, 0, 2.5), class = ‘b’),
prior(student_t(3, 0, 2.5), class = ‘Intercept’))
tmp.imp.t.stan_glm <- brm_multiple(formula =
OpioidStillTaking ~
Age +
Sex +
BMI +
c.Occupation +
c.Relationship +
c.ASAPhysicalStatus +
c.SurgeryType +
PreopAnxietyTScore +
PreopDepressionTScore +
PreopPhysicalFunctionTScore +
SitePainLastWeek +
PreopCompositeNonOpioid +
PreopCompositeOpioid +
OME +
AnesthesiaDuration +
c.NonOpioidAnalgesicsCount +
General +
Neuraxial,
family = ‘bernoulli’,
prior = bprior,
data = tmp.df.imp,
control = list(adapt_delta = 0.99, max_treedepth = 20),
cores = 8,
chains = 8,
seed = 12345678,
iter = 8000)
tmp.imp.t.stan_glm.cvs <- cv_varsel(
tmp.imp.t.stan_glm,
method = ‘forward’,
data = tmp.df.imp,
cv_method = ‘LOO’,
verbose = FALSE
)