lavaanExtractStandardizedDirectedPaths: lavaan: Extract standardized directed paths

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Extract directed paths from the result of 'lavaan::standardizedSolution()' function

Usage

1
lavaanExtractStandardizedDirectedPaths(lavaanStandardizedSolutionDF)

Arguments

lavaanStandardizedSolutionDF

lavaan.data.frame. Contains standardized coefficients from call of 'lavaan::standardizedSolution()' function

Value

data.frame. DataFrame with standardized directed paths.

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
25
26
## Official example provided in lavaan package
## The industrialization and Political Democracy Example
## Bollen (1989), page 332
## Specify model
model <- '
  # latent variable definitions
     ind60 =~ x1 + x2 + x3
     dem60 =~ y1 + a*y2 + b*y3 + c*y4
     dem65 =~ y5 + a*y6 + b*y7 + c*y8

  # regressions
    dem60 ~ ind60
    dem65 ~ ind60 + dem60

  # residual correlations
    y1 ~~ y5
    y2 ~~ y4 + y6
    y3 ~~ y7
    y4 ~~ y8
    y6 ~~ y8'
## fit model to data
fit <- sem(model, data = PoliticalDemocracy)
## get standardized solutions
fit_stdSolution <- standardizedSolution(fit)
## Get standardized directed paths
lavaanExtractStandardizedDirectedPaths(lavaanStandardizedSolutionDF = fit_stdSolution)

masem-research/masemPsychometrics documentation built on Dec. 9, 2020, 2:21 a.m.