1.9 Parameter list summary
The parameters list contains one (or more) list for each hierarchical level that you want to simulate at. A residual list is always needed, specifying variances/covariances for the residual. Additionally, the parameter list can also be provided with an intercept vector and interactions list.
The simplest parameter list will look something like this:
=list(
parametersresidual=list(
vcov=...
) )
We can add more complexity by adding an intercept (if not specified, is assumed to be 0):
=list(
parametersintercept=c(...),
residual=list(
vcov=...
) )
and then simulate variables that vary at the observation level:
=list(
parametersintercept=c(...),
observation=list(
beta = ...
),residual=list(
vcov = ...
) )
as well as variables that vary at the other levels, for example at the level of the individual:
=list(
parametersintercept=c(...),
individual=list(
names = c(...),
beta = ...
),observation=list(
names = c(...),
beta = ...
),residual=list(
vcov = ...
) )
Finally we can add in interactions:
=list(
parametersintercept=c(...),
individual=list(
names = c(...),
beta = ...
),observation=list(
names = c(...),
beta = ...
),interactions=list(
names = c(...),
beta = ...
),residual=list(
vcov = ...
) )
For each item in the parameter list (excluding intercept, interactions, and residual), the following can be specified:
- names Vector containing the names of predictors from this list that will be output. This doesn’t not have to be specified, unless the predictors at this level are included in interactions. By default, the names will be the name of the list (e.g. ‘individual’ in the example above), appended with
_effect
and a sequential number if there are multiple predictors. - group Character string relates the level of variation back to the data_structure. Does not have to be specified and by default is the name of the list.
- mean Vector of means for the predictor variables. Defaults to 0.
- vcov Either a vector of variances, or a variance-covariance matrix, for the predictor variables. Defaults to identity matrix.
- vcorr Variance-correlation matrix, can be specified instead of vcov (it is ignored if both are specified).
- beta Vector (or matrix with multiple responses) of effect sizes/slopes. Defaults to 1.
- fixed Logical, indicating whether the effects for the levels are fixed or to be simulated. If TRUE,
beta
represents the fixed effects. Defaults to FALSE. - covariate Logical, indicating whether the indexes in the data structure are to be used as a continuous variable rather than simulating one. Defaults to FALSE.
- functions Vector - transformation to be applied to the response variable. Defaults to ‘identity’.