View source: R/plot.netSEMp1.R
| plot.netSEMp1 | R Documentation |
Plot netSEMp1 result plot.netSEMp1 plots a network structural equation network model diagram, fitted under principle 1, based on best functional form for each selected pairwise variable.
## S3 method for class 'netSEMp1'
plot(
x,
cutoff = NULL,
latent = NULL,
plot.save = FALSE,
title = "netSEM_markovian",
path = NULL,
filename = NULL,
style = TRUE,
...
)
x |
An object of class "netSEMp1", the returned list from |
cutoff |
A threshold value for adjusted R-squared. The maximum number of cutoff is 3. |
latent |
The latent variable that corresponds to the mechanic variable. The default is NULL. |
plot.save |
True/False, it saves the network diagram plot as a png file. The default is false. |
title |
The title. The default is 'netSEMp1.' |
path |
The pathways to highlight with a certain color. The default is NULL. |
filename |
A character string naming a file to save as a png file. |
style |
True/False, it plots the first interval in the network diagram with dotted weak line. The default is True. |
... |
A S3 generic/method consistency. |
An html style plot of pairwise relationship pathway diagram between exogenous variables and an endogenous variable. Arrows show relationships between each variable with given statistical relations along the connection lines.
netSEMp1
## Not run:
# Load acrylic data set
data(acrylic)
# Build a netSEM model
ans <- netSEMp1(acrylic, "IrradTot", "YI")
# Plot the network model
plot(ans, cutoff = c(0.3,0.6,0.8))
# Plot the network model without a cutoff
plot(ans)
plot(ans, cutoff = c(0.3,0.6,0.8), title = "Acrylic")
\donttest{
# Plot the network diagram with latent argument labels
plot(ans, cutoff = c(0.3, 0.6, 0.8),
latent = c('IAD1' = 'FundAbsEdge',
'IAD2' = 'UVStab',
'IAD2p' = 'UVStab',
'IAD3' = 'YelMet'))
# Drop relationships lower than minimum cutoff value
plot(ans, cutoff = c(0.3,0.6,0.8), style = FALSE)
# Change color of pathways
plot(ans, cutoff = c(0.3,0.6,0.8),
title = "Acrylic", path = c('red', 'IAD1->IAD2p'),
latent = c('IAD1' = 'FundAbsEdge'), style = FALSE)
# Save plot
plot.netSEMp1(ans, acrylic,
cutoff = c(0.3, 0.6, 0.8),
plot.save = TRUE,
filename = 'acrylic-netSEMp1')
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.