summary_lavaan: Dig through lavaan objects and extract information as data...

Description Usage Arguments Value Examples

Description

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.

Usage

1

Arguments

object

A model of class class lavaan-class.

...

all arguments from 'lavaan::summary'. All argument information is available at ?'lavaan-class' in the 'summary' section.

Value

a list containing data frames with relevant information.

Examples

 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)

asqm/digavaan documentation built on May 10, 2019, 8:05 a.m.