- data
A data frame containing the observed variables and a cluster identifier variable.
- vars
A character vector of variable names to include in the GGM estimation. Must contain at least 2 variables.
- idvar
A string indicating the name of the cluster/group identifier variable in data. Defaults to "id".
- estimator
The estimator to be used. Currently only "lmer" (sequential univariate multilevel estimation via lmer) is supported.
- randomeffects
How should random effects be estimated? "correlated" estimates correlated random slopes for within-cluster predictors (using (1 + predictors | cluster)), "orthogonal" estimates uncorrelated random slopes (using (1 + predictors || cluster)), and "fixed" estimates only a random intercept with no random slopes. "default" selects "correlated" when the number of variables is 6 or fewer and "orthogonal" otherwise, as correlated random effects become computationally expensive with many variables.
- scale
Logical. Should variables be grand-mean standardized before estimation? Defaults to TRUE. Standardization ensures that edge weights are comparable across variables.
- na.rm
Logical. Should rows with missing values be removed? Defaults to TRUE.
- verbose
Logical indicating if console messages and progress bars should be shown.
- full_detrend
Logical. If TRUE, standardize each variable per observation position across all clusters before estimation. For example, all first observations within each cluster are standardized together, all second observations together, etc. Requires a balanced design (equal number of observations per cluster). Applied before grand-mean standardization (scale). Defaults to FALSE.
- x
An mlGGM object.
- object
An mlGGM object.
- show
Character vector indicating which sections to show in the summary. Options: "fit" for information criteria (AIC/BIC), "within" for within-cluster partial correlations and p-values, "between" for between-cluster partial correlations and p-values.
- round
Number of decimal places for rounding in the summary output. Defaults to 3.
- type
The type of network to plot or extract: "within" for the within-cluster partial correlation network, "between" for the between-cluster partial correlation network.
- partial
Logical. If TRUE (default), plots partial correlations. If FALSE, plots zero-order correlations.
- SD
Logical. If TRUE, plots random effect standard deviations instead of fixed effects. Only available for the within-cluster network.
- subject
Integer specifying which cluster's network to plot. Only available for the within-cluster network. When specified, the cluster-specific network (fixed effects + random effects for that cluster) is plotted.
- order
Character vector or numeric vector specifying the order of nodes in the plot.
- nonsig
How to handle non-significant edges in the plot: "show" shows all edges regardless of significance, "hide" removes non-significant edges, "dashed" shows non-significant edges as dashed lines. "default" hides non-significant edges for partial correlation networks and shows them otherwise.
- rule
Significance rule for the undirected network: "or" requires at least one regression direction to be significant, "and" requires both directions to be significant. The "and" rule is more conservative and tends to improve specificity, especially for the between-cluster network.
- alpha
Significance level for thresholding edges. Defaults to 0.05.
- layout
Layout algorithm for the network plot, passed to qgraph. Defaults to "spring".
- ...
Additional arguments passed to qgraph (for plot) or ignored.