[R] [R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
friendly at yorku.ca
Mon May 24 18:31:42 CEST 2010
lavaan looks like a very nice package. From the tutorial introduction
I see you create path diagrams for some of the models you describe.
How did you do this? I don't see a function for this in the package.
I know there is a path.diagram function in the sem package that uses
dot to draw the diagram, but I've always found the layouts from dot
somewhat strange for path diagrams without a fair bit of tweaking.
Yves Rosseel wrote:
> Dear R-users,
> A new package called `lavaan' (for latent variable analysis) has been
> uploaded to CRAN. The current version of lavaan (0.3-1) can be used for
> path analysis, confirmatory factor analysis, structural equation
> modeling, and growth curve modeling.
> More information can be found on the website: http://lavaan.org
> Some notable features of lavaan:
> - the 'lavaan model syntax' allows users to express their models in a
> compact, elegant and useR-friendly way
> - lavaan is robust and reliable: there are no convergence problems and
> numerical results are very close (if not identical) to the commercial
> package Mplus
> - many different estimators are available: ML, GLS, WLS, robust ML using
> Satorra-Bentler corrections, and FIML for data with missing values
> - full support for meanstructures and multiple groups
> - user friendly output including standardized solutions, fit measures,
> modification indices and more
> To get a first impression of how the 'lavaan model syntax' looks like,
> below is the full R code for fitting a SEM model:
> ## begin R Code ##
> # The industrialization and Political Democracy Example
> # Bollen (1989), page 332
> model <- '
> # latent variable definitions
> 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
> fit <- sem(model, data=PoliticalDemocracy)
> summary(fit, fit.measures=TRUE)
> ## end R code ##
> Please feel free to contact me directly with questions and comments.
> Yves Rosseel.
More information about the R-help