Description Usage Arguments Value Examples
lavaan-class
related objects contain a lot of information, specially in
group-wise models and models containing a lot of customization. Users
usually use 'lavaan::summary“ to print information form the model but then
find themselves rambling through the inners of the model to actually
extract the same estimates that were previewed in 'lavaan::summary'
as actual numbers and data frames. 'summary_lavaan' is a rewrite
of 'lavaan::summary' but instead of printing, it returns the same
information as a list with the information as data frames.
1 | summary_lavaan(object, ...)
|
object |
A model of class class |
... |
all arguments from 'lavaan::summary'. All argument information is available at ?'lavaan-class' in the 'summary' section. |
a list containing data frames with relevant information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | library(lavaan)
model <- "
# latent variables
ind60 =~ x1 + x2 + x3
dem60 =~ y1 + y2 + y3 + y4
dem65 =~ y5 + y6 + y7 + y8
# regressions
dem60 ~ ind60
dem65 ~ ind60 + dem60
# residual covariances
y1 ~~ y5
y2 ~~ y4 + y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8"
fit <- sem(model, data=PoliticalDemocracy)
# Traditional print
summary(fit)
# Same information but as a data frames
summary_lavaan(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.