Description Usage Arguments Value Examples
Extract directed paths from the result of 'lavaan::standardizedSolution()' function
1 | lavaanExtractStandardizedDirectedPaths(lavaanStandardizedSolutionDF)
|
lavaanStandardizedSolutionDF |
lavaan.data.frame. Contains standardized coefficients from call of 'lavaan::standardizedSolution()' function |
data.frame. DataFrame with standardized directed paths.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.