Build a dataset for fitted.brmcoda
used in substitution
model
Arguments
- object
A fitted
brmcoda
object.- ref
Either a character value or vector or a dataset. Can be
"grandmean"
and/or"clustermean"
, or adata.frame
ordata.table
of user's specified reference grid consisting of combinations of covariates over which predictions are made. User's specified reference grid is only possible for simple substitution. Single level models are default to"grandmean"
.- level
A character string or vector. Should the estimate of multilevel models focus on the
"between"
and/or"within"
or"aggregate"
variance? Single-level models are default to"aggregate"
.- weight
A character value specifying the weight to use in calculation of the reference composition. If
"equal"
, give equal weight to units (e.g., individuals). If"proportional"
, weights in proportion to the frequencies of units being averaged (e.g., observations across individuals). Default to"equal"
forref = "grandmean"
and"proportional"
forref = "clustermean"
.- fill
Logical value only relevant when
ref
is an user's specified reference grid in which information about some, but not all covariates is provided (e.g., models including age and sex as covariate but only age was provided in the reference grid). IfTRUE
, the unspecified covariates are filled with the default reference grid. IfFALSE
, users will be asked to provide a full reference grid. Currently only support the default toFALSE
.