lmerVAR {modnets} | R Documentation |
Mixed-effects modeling for the GVAR in multilevel data
Description
Proper estimation of mixed-effects GVAR models. This is an alternative
fitting procedure to that provided by the mlGVAR
function. The
key differences are that this function can take significantly longer to fit,
and it may fail when trying to fit especially large models.
Usage
lmerVAR(
data,
m = NULL,
temporal = "default",
contemp = "default",
idvar = "ID",
intvars = NULL,
center = TRUE,
scale = TRUE,
centerWithin = TRUE,
scaleWithin = FALSE,
exogenous = TRUE,
covariates = NULL,
fix = NULL,
verbose = TRUE,
beepno = NULL,
dayno = NULL,
deleteMissing = TRUE
)
Arguments
data |
|
m |
Character vector or numeric vector indicating the moderator(s), if
any. Can also specify |
temporal |
Only affects the model for the temporal network and
between-subjects network (which is derived from the temporal network).
Options are |
contemp |
Options are |
idvar |
Character string to indicate which variable contains the participant identification numbers. |
intvars |
Character vector to indicate which interaction terms to include in the model. Not necessary, but useful to add significant customization and explicitly state which interactions to include in the model. |
center |
Logical. Determines whether to mean-center the variables. |
scale |
Logical. Determines whether to standardize the variables. |
centerWithin |
Following the application of |
scaleWithin |
Following the application of |
exogenous |
Logical. Indicates whether moderator variables should be
treated as exogenous or not. If they are exogenous, they will not be
modeled as outcomes/nodes in the network. If the number of moderators
reaches |
covariates |
See corresponding argument in |
fix |
Character vector to indicate which variables to only create fixed effects terms for. |
verbose |
Logical. Determines whether to output progress bars and messages in the console during the fitting process. |
beepno |
Character string or numeric value to indicate which variable
(if any) encodes the survey number within a single day. Must be used in
conjunction with |
dayno |
Character string or numeric value to indicate which variable (if
any) encodes the survey number within a single day. Must be used in
conjunction with |
deleteMissing |
Logical. Determines whether to automatically perform listwise deletion if there are any missing values in the dataset. |
Details
In the process of adding further documentation. More details to come. The method is referred to as the "two-step multilevel VAR" (Epskamp et al., 2018).
Value
A lmerVAR
mixed-effects model with corresponding networks.
References
Epskamp, S., Waldorp, L. J., Mottus, R., & Borsboom, B. (2018). The gaussian graphical model in cross-sectional and time-series data. Multivariate Behavioral Research. 53, 453-580.
See Also
Examples
# The options were chosen so that the function would take less time to run
x <- lmerVAR(mlgvarDat, 'M', temporal = "fixed", contemp = "orthogonal")