The prediction methods of brms, such as brms::log_lik(),
brms::posterior_predict(), brms::posterior_epred(),
brms::predict.brmsfit(), brms::fitted.brmsfit() and brms::loo(),
turn newdata into Stan data through standata(). For a bmmfit,
newdata can be in the layout of the data you gave to bmm(): the
columns bmm built from those data when it fitted the model are built
again. Rows of the fit's model frame,
fit$data, are used as they are.
Usage
# S3 method for class 'bmmfit'
standata(object, newdata = NULL, ...)Arguments
- object
A
bmmfitobject- newdata
An optional data frame, in the layout of the data given to
bmm()or a subset of the rows ofobject$data. Its rows keep their order. Whennewdatais in the layout given tobmm(), the columnsbmmbuilds itself are built again, and a column ofnewdatawith one of those names is replaced.- ...
Further arguments passed to
brms::standata()
