Home > Software engineering >  How to draw a block scheme for SEM (Structural equation modeling ) in R?
How to draw a block scheme for SEM (Structural equation modeling ) in R?

Time:09-24

In this question I will use lavaan tutorial examples. They provide the following SEM model:

model <- '
  # measurement model
    ind60 =~ x1   x2   x3
    dem60 =~ y1   y2   y3   y4
    dem65 =~ y5   y6   y7   y8
  # regressions
    dem60 ~ ind60
    dem65 ~ ind60   dem60
  # residual correlations
    y1 ~~ y5
    y2 ~~ y4   y6
    y3 ~~ y7
    y4 ~~ y8
    y6 ~~ y8
'

And they also have a nice block scheme for this model:

enter image description here

My question is:

Are there any libraries for drawing such diagrams in R?

CodePudding user response:

Try lavaanPlot package, https://cran.r-project.org/web/packages/lavaanPlot/vignettes/Intro_to_lavaanPlot.html

Here's a tutorial, https://stats.idre.ucla.edu/r/seminars/rsem/

  • Related