STb_lfo()
STb_lfo.RdEstimate leave-future-out expected log predictive density for an STbayes model.
Usage
STb_lfo(
lfo_type = c("parallel", "sequential"),
fit,
STb_data,
stan_model,
M,
L,
k_thres = 0.7,
...
)Arguments
- lfo_type
String specifying how future observations are left out.
"parallel"predicts the next observations within each trial."sequential"moves through trials sequentially.- fit
A fitted
STbayesmodel object to use as the initial reference fit.- STb_data
A formatted
STbayesdata object returned byimport_user_STb().- stan_model
Character string containing the Stan model code returned by
generate_STb_model().- M
Integer of future observations to predict at each step.
- L
Integer of observations to condition on before the first prediction/refit. This should be larger than the number of demonstrators.
- k_thres
Numeric. Pareto-\(k\) threshold above which the model is refit. Defaults to
0.7.- ...
Additional arguments passed to the model refitting step.