model <- 'alpha =~ x1 + x2 + x_3 # latent variable
beta <~ x4 + x5 + x6 # composite
gamma =~ x7 + x8 + x9 # latent variable
Xi =~ x10 + x11 + x12 + x13 # latent variable
# regressions
Xi ~ v * alpha + t * beta + c * 1
alpha ~ yy * Theta1 + tt * beta + ss * gamma
'
test <- lav_model_plotinfo(model)
test1 <- lav_plotinfo_positions(test)
lav_plotinfo_rgraph(test1, lightness = 1.1)
# better position for constant in regressen Xi, no sloped labels
test2 <- lav_plotinfo_positions(test, placenodes = list(`1vanXi` = c(2, 5)))
lav_plotinfo_rgraph(test2, FALSE, lightness = 1.1)
modelml <- '
level: 1
fw =~ 1*y_1 + y_2 + y_3 + y_5
level: 2
fb =~ 1*y_1 + y_2 + y_3 + y_4
y_2 ~~ cv24 * y_4
'
test <- lav_model_plotinfo(modelml)
test <- lav_plotinfo_positions(test)
lav_plotinfo_rgraph(test, sloped_labels = FALSE, addgrid = FALSE,
auto_subscript = FALSE)
if (FALSE) {
# example where plot is stored in a PNG file
lav_plotinfo_rgraph(test, sloped_labels = FALSE, addgrid = FALSE,
auto_subscript = FALSE, outfile="demo_rplot.png")
}
Run the code above in your browser using DataLab