net
returns the adjacency matrix for any network model fit
using functions from the modnets
package. netInts
returns a matrix of interaction terms associated with a moderated network.
net(
fit,
n = "beta",
threshold = FALSE,
rule = "OR",
binary = FALSE,
nodewise = FALSE,
d = 14,
r = NULL
)netInts(
fit,
n = "temporal",
threshold = FALSE,
avg = FALSE,
rule = "none",
r = NULL,
empty = TRUE,
mselect = NULL
)
When multiple networks exist for a single object, this allows the
user to indicate which adjacency matrix to return. For a GGM, all values of
this argument return the same adjacency matrix. For a SUR network,
"beta"
and "temporal"
return the coefficients associated with
the temporal network, while "pdc"
returns the Partial Directed
Correlations, or the standardized temporal network.
"contemporaneous"
and "pcc"
return the standardized
contemporaneous network (Partial Contemporaneous Correlations).
"kappa"
returns the unstandardized residual covariance matrix. All
of these terms apply for multilevel networks, but "between"
can also
return the between-subjects network. If a numeric or logical value is
supplied, however, this argument will function as the threshold
argument. A numeric value will set a threshold at the supplied value, while
TRUE
will set a threshold of .05.
A numeric or logical value to set a p-value threshold.
TRUE
will automatically set the threshold at .05.
Only applies to GGMs (including between-subjects networks) when a
threshold is supplied. The "AND"
rule will only preserve edges when
both corresponding coefficients have p-values below the threshold, while
the "OR"
rule will preserve an edge so long as one of the two
coefficients have a p-value below the supplied threshold.
Logical. If TRUE
then the weighted adjacency matrix will
be converted into an unweighted adjacency matrix.
Logical, only applies to GGMs (including between-subjects
networks). If TRUE
then the adjacency matrix will retain all
coefficients in their original form. In this case, values in rows represent
the coefficients predicting the columns.
Numeric. Chooses which rows/columns to remove from the output, if desired.
Logical. For netInts
, determines whether to take the
average two corresponding interaction terms.
Logical. Determines the output of netInts
when
fit
is not a moderated network. If TRUE
then an empty list
will be returned. If FALSE
then a matrix of zeros will be returned.
Only used for netInts
when there is more than
one exogenous moderator. Allows the user to indicate which moderator should
be used to construct the interaction matrix.
An adjacency matrix representing a network or a matrix of interaction terms.
For GGMs when a non-symmetric matrix is requested, columns will represent outcomes and rows will represent predictors. For temporal networks, columns represent predictors and rows represent outcomes.
Can also be used with output from the resample
and
bootNet
functions.
fitNetwork, mlGVAR, lmerVAR,
bootNet, resample, simNet, mlGVARsim
# NOT RUN {
x <- fitNetwork(ggmDat, 'M')
net(x, threshold = .05)
netInts(x, threshold = TRUE)
# }
# NOT RUN {
y <- mlGVAR(mlgvarDat, 'M')
net(y, n = 'beta')
net(y, n = 'pcc')
net(y, n = 'between')
netInts(y)
# }
Run the code above in your browser using DataLab