net {modnets} | R Documentation |
Get adjacency matrices from fit objects
Description
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.
Usage
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
)
Arguments
fit |
A fitted network model. Can be the output from
|
n |
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,
|
threshold |
A numeric or logical value to set a p-value threshold.
|
rule |
Only applies to GGMs (including between-subjects networks) when a
threshold is supplied. The |
binary |
Logical. If |
nodewise |
Logical, only applies to GGMs (including between-subjects
networks). If |
d |
Numeric. Only used for output of |
r |
Numeric. Chooses which rows/columns to remove from the output, if desired. |
avg |
Logical. For |
empty |
Logical. Determines the output of |
mselect |
Only used for |
Details
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.
Value
An adjacency matrix representing a network or a matrix of interaction terms.
See Also
fitNetwork, mlGVAR, lmerVAR,
bootNet, resample, simNet, mlGVARsim
Examples
x <- fitNetwork(ggmDat, 'M')
net(x, threshold = .05)
netInts(x, threshold = TRUE)
y <- mlGVAR(mlgvarDat, 'M')
net(y, n = 'beta')
net(y, n = 'pcc')
net(y, n = 'between')
netInts(y)