plotNet {modnets} | R Documentation |
Plot moderated and unmoderated network models
Description
Core function for plotting various types of network models. Accessible
through the plot()
S3 generic function.
Usage
plotNet(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'ggm'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'SURnet'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'mlGVAR'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'lmerVAR'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'ggmSim'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'mlGVARsim'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
## S3 method for class 'GVARsim'
plot(
x,
which.net = "temporal",
threshold = FALSE,
layout = "spring",
predict = FALSE,
mnet = FALSE,
names = TRUE,
nodewise = FALSE,
scale = FALSE,
lag = NULL,
con = "R2",
cat = "nCC",
covNet = FALSE,
plot = TRUE,
elabs = FALSE,
elsize = 1,
rule = "OR",
binarize = FALSE,
mlty = TRUE,
mselect = NULL,
...
)
Arguments
x |
Output from any of the |
which.net |
When multiple networks exist for a single object, this
allows the user to indicate which network to plot. 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.
|
layout |
Character. Corresponds to the |
predict |
If |
mnet |
Logical. If |
names |
If |
nodewise |
Only applies to GGMs. If |
scale |
Logical. Only applies when |
lag |
This argument will be removed. The function will automatically detect whether the network is based on time-lagged data. |
con |
Character string indicating which type of prediction error to plot
for continuous variables, if |
cat |
Character string indicating which type of prediction error to plot
for categorical variables, if |
covNet |
Logical. Only applies when a covariate is modeled. Allows the covariate to be plotted as a separate square "node". |
plot |
Logical. If |
elabs |
Logical. If |
elsize |
numeric |
rule |
Only applies to GGMs (including between-subjects networks) when a
threshold is supplied. The |
binarize |
Logical. If |
mlty |
Logical. If |
mselect |
If the model contains more than one moderator, input the
character string naming which moderator you would like the plot to reflect.
Only affects which lines are dashed or solid. Not compatible with the
|
... |
Additional arguments. |
Value
Displays a network plot, or returns a qgraph
object if
plot = FALSE
.
See Also
fitNetwork, predictNet, mlGVAR,
lmerVAR, simNet, mlGVARsim, plotCoefs,
intsPlot, resample
Examples
fit1 <- fitNetwork(ggmDat)
plot(fit1)
plotNet(fit1) # This and the command above produce the same result
fit2 <- fitNetwork(gvarDat, moderators = 'M', lags = 1)
plot(fit2, 'pdc') # Partial Directed Correlations
plot(fit2, 'pcc') # Partial Contemporaneous Correlations