corPlot | R Documentation |
Draw correlation plot
corPlot(
fit,
label = 2,
yreverse = TRUE,
xangle = 45,
seek = NULL,
replace = NULL,
...
)
fit |
An object of class lavaan. Result of sem function of package lavaan |
label |
if 0, no label(default), if 1, use r value as label, if 2, use r value with significant mark as label |
yreverse |
Logical. if true, reverse the order of y axis. |
xangle |
axis.x.text.angle |
seek |
string to look for |
replace |
A string of replacement |
... |
Further arugement to be passed on to geom_text |
A ggplot
require(mycor)
require(lavaan)
require(semMediation)
model='
knowledge =~ general+symptoms+treatmt
empathy =~ cognitiv+emotion+disposit+attitude
intervention =~ classrm+instruct'
mediationModel=makeEquation(X="knowledge",M="empathy",Y="intervention")
model=paste0(model,mediationModel)
fit=sem(model,data=ADHD)
corPlot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.