Skip to content

R packages for Structural Equation Model: SEM with R


Structural Equation Model (SEM) was first examined by a software called LISREL. Then, SEM has been mainly run by several proprietary software i.e., Mplus, AMOS, EQS, SAS and a new version of Stata (v.12).

However, you may also run SEM with a great but free software like R.

To the best of my knowledge, there are now four active packages that you can use to fit SEM. Here they are:

Main Packages (for fitting SEM models) 

  1. sem (John Fox, 2006):The first R package for SEM ” fit by maximum likelihood assuming multinormality, and single-equation estimation for observed-variable models by two-stage least.squares.” It was also the first package I tried to run SEM in R. Thanks to a very quick response from Prof.Fox on my question I emailed him.
    See Example of ‘sem’ package here.
  2. OpenMx (Boker et al, 2011)
    A very active package that “is free and open source software for use with R that allows estimation of a wide variety of advanced multivariate statistical models.” contributed by experts in R and SEM.
    See Example of ‘OpenMx’ package here.
  3. lavaan (Yves Rosseel, 2012)
    A promising package for SEM. Its command language is similar to those of Mplus. Hence it is perhaps the most user-friendly package for SEM to date.
    See Example of ‘lavaan’ package here.
    Link to JSS paper
  4. semPLS (Armin Monecke, 2012)
    Fitting Structural Equation Model Using Partial Least Squares
    See: CRAN link, JSS paper
  5. plspm (Gaston Sanchez, 2012)
    R package dedicated to Partial Least Squares (PLS) methods (CRAN, plsmodeling.com)
    by Gaston Sanchez and Laura Trinchera
    A corresponding book titled “PLS Path Modeling with R” can be downloaded here.
My paper in useR! 2011 has evaluated R packages vs. Proprietary software i.e., AMOS & Lisrel.

Today (30 May 2012), I gladly found that there are also complementary packages for SEM in R as follows.

Complementary packages

  • SEMplusR: Functions, examples and datasets to learn, use and teach Structural Equation Modeling (SEM)  [GitHub]
    by Pairach Piboonrungroj 
  • SEMModComp: Model Comparisons for SEM [CRAN link, Additional Documents]
    by  Roy Levy
  • semGOF: an add-on package which provides fourteen goodness-of-fit indeces for structural equation models using ‘sem’ package.[CRAN]
    by Elena Bertossi 
  • stremo: Functions to help the process of learning structural equation modelling [CRAN link]
    by  Gustavo Carvalho, Marco Batalha, and Owen Petchey
  • FIAR: Functional Integration Analysis in R [CRAN link]
    by  Bjorn Roelstraete
  • semTools: Useful tools for structural equation modeling [CRAN link]
    by  Sunthud Pornprasertmanit, Patrick Miller, Alex Schoemann, Yves Rosseel
  • simsem: SIMulated Structural Equation Modeling [CRAN link]
    by  Sunthud Pornprasertmanit, Patrick Miller, Alexander Schoemann
  • pathmox R package dedicated to segmentation trees in PLS Path Modeling [CRAN, plsmodeling.com]

Packages for SEM plotting and graphics

  • qgraph: Network representations of relationships in data [CRAN link]
    by  Sacha Epskamp, Angelique O. J. Cramer, Lourens J. Waldorp, Verena D. Schmittmann and Denny Borsboom
  • psych: Procedures for Psychological, Psychometric, and Personality Research [CRAN link]
    by William Revelle

Packages that link R with other software to fit SEM

  • Mplus
    Automating Mplus Model Estimation and Interpretation [CRAN link]
    by  Michael Hallquist
  • EQS
    R/EQS Interface [CRAN link]
    by  Patrick Mair and Eric Wu

More external resources on SEM in R

  • CRAN Task view on ‘Structural Equation Models, Factor Analysis, PCA’ in Psychometrics [url]
    by Patrick Mair
  • A tutorial on the use of sem package  [url]
    by William Revelle
  • A post on ‘Structural Equation Modeling in R‘  [url]
    by Jeromy Anglim
12 Comments Post a comment
  1. Faan Louw #

    I tend to agree with you, lavaan is extremely user friendly, but sem seems to offer a greater variety of test and much needed capabilities that are not (yet?) available in lavaan. Let us encourage the developers of lavaan to extend their package to emulate AMOS and sem more closely.

    August 15, 2011
    • Dear Faan,

      lavaan is really a light and hope. I just met the developer at the useR! 2011 and I could say that there’s a lot more to come from lavaan next version. Also a new version of sem package, with more compact code, will be also released soon!

      August 18, 2011
  2. J’ai trouvée votre blog par hasard et je ne le regrette pas du
    tout !!!

    May 19, 2014
  3. Ҭгès intéressant : selon moi cet article intéresserait une meuf

    July 25, 2014
  4. If the rest fails and also the antenna is a useful one and
    new, then consider getting hold of your signal booster just for this should greatly increase the reception. Indoor
    antennas are portable and offer great convenience while outdoor antennas offer superior reception opportunities.
    Diy long range hdtv antenna The multidirectional performance of
    8VSB is poor so you will need to put money into a good unidirectional antenna for receiving a good signal.
    If you’re planning to choose the most effective high-definition aerials, then you will need to
    follow some in the steps for selecting the HDTV antenna.
    You’re instructing your son to solve your rabbit
    ear antennas to enable you to see the game without
    those constant blizzard interruptions. Freevision indoor/outdoor hdtv antenna This
    form of antenna can be adjusted and is more efficient in receiving
    digital television signals. Mant940 indoor/outdoor hdtv antenna Unless your STB is decoding an HD signal, or even the signal is via another
    HD source directly into your HDTV it’s most likely not
    planning to be in HD. You just need a implies of selecting up and transmitting the signal, it can be
    feasible to make use of a wireless Tv set antenna in place in the built-in Wi-Fi
    receiver. Diy hdtv antenna cardboard One major requirement is the fact that this antenna can operate while using different broadcast
    channels.

    Mounting your antenna inside the attic is possible, but it really is best
    that you happen to be aware in the pitfalls related to
    this form of configuration. To get the radio signal,
    the receiver posseses an antenna which is located in the range of signal.
    Gemini hdtv antenna One from the key elements you
    need to get your high-definition TV set to be effective as it is intended to you personally need
    to spend money on a quality HDTV antenna. Reproducing
    and recording an HDTV signal was an issue within the early years.

    There are lots of antenna installation firms that offer their online
    services. Hdtv antenna sold at costco You’re instructing your
    son to solve your rabbit ear antennas so that you can see
    the game without those constant blizzard interruptions.

    October 4, 2014
  5. I have been looking about for an post like this. Took some time but lastly found it… Actually very good read thanks. It is been difficult to find the data I required. I use this internet site for a very good deal.

    December 17, 2016

Trackbacks & Pingbacks

  1. Data Analysis with R Training at Cardiff Bioscience – Day 1 | Pairach Piboonrungroj
  2. Data Analysis with R – Session 2 | Pairach Piboonrungroj
  3. How to create R extensions / packages [resources] | Pairach Piboonrungroj
  4. Resources for Structural Equation Model (SEM) | Pairach Piboonrungroj
  5. sem package in R: a sample of transaction cost measurement | Pairach Piboonrungroj
  6. The 1st Year of Pairach.com and its future? | Pairach Piboonrungroj

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: