Questions tagged [lavaan]

`lavaan` is the LAtent VAriable ANalysis package in R used for structural equation modeling

lavaan is R package for latent variable modeling $\approx$ structural equation modeling (and related techniques such as simultaneous equations, mediation/moderation analysis, etc.)

See the main project page: http://lavaan.ugent.be/ and CRAN page: https://cran.r-project.org/web/packages/lavaan/index.html.

239 questions
14
votes
1 answer

Structural equations: how to specify interaction effects in R lavaan package

I am using R lavaan package to estimate a structural equation model. Let's say the model consists of 1 endogenous manifest variable with 1 latent and 2 manifest explanatory variables: group = {0,1} attitude1 = latent,scale age = respondent's…
Maxim.K
  • 560
  • 7
  • 20
12
votes
1 answer

What's the difference between a MIMIC factor and a composite with indicators (SEM)?

In structural equation modeling with latent variables (SEM), a common model formulation is "Multiple Indicator, Multiple Cause" (MIMIC) where a latent variable is caused by some variables and reflected by others. Here's a simple…
dmp
  • 283
  • 3
  • 10
12
votes
1 answer

How do I interpret lavaan output?

I am attempting confirmatory factor analysis (CFA) using lavaan. I am having a hard time interpreting the output produced by lavaan. I have a simple model - 4 factors each supported by items from collected survey data. The factors are in line with…
Judy
  • 271
  • 1
  • 2
  • 9
11
votes
0 answers

How to use formative indicators in covariance-based SEM with lavaan?

I'm trying to build a covariance-based structural equation model (SEM) using both reflective and formative specifications of latent variables. I use the sem function in the lavaan package for estimation (R version 3.1.3, lavaan version 0.5-18). But…
jhg
  • 305
  • 2
  • 4
  • 11
9
votes
1 answer

How to predict factor scores in Lavaan

In doing a CFA in Lavaan, I had to use the covariance matrix as an input because I was getting some errors with the original data e.g., negative variances. I would normally have predicted factor scores using the predict() function, lavPredict…
8
votes
2 answers

Whether to use EFA or CFA to predict latent variables scores?

I have a dataframe of individual observations, that I partitioned to create a training (0.7 prop) and a test set (0.3 prop). I started by running an exploratory factor analysis (EFA) on the training set (with the psych::fa function). Then, based on…
7
votes
1 answer

Instrument Variables and Exclusion Restriction from a Mediation perspective

I'm having trouble making sense of the exclusion restriction in instrumental variables. I understand that the unbiased treatment effect is $B = \frac{Cov(Y, Z)}{Cov(S, Z)}$, where $Y$ is the outcome, $S$ is the treatment, and $Z$ is the instrument.…
sam
  • 121
  • 4
7
votes
1 answer

R - moderated mediation using the lavaan package

I am interested in determining the conditional indirect effects of X on Y at a series of values for a third variable Z. I was able to use the lavaan package to calculate some initial indirect effects based of the syntax available in this post:…
B Victor
  • 133
  • 1
  • 2
  • 8
6
votes
1 answer

lavaan works with `cfa`, provides error with lavaan(method = 'cfa')

Estimating a simple Confirmatory Factor Analysis (CFA) model with lavaan gives inconsistent results when I use cfa and lavaan(method = "cfa"). library(lavaan) 10 observations, four indicators foo <- structure(list(ind1 = c(0.2, -1, -0.2, 0.6,…
tom
  • 193
  • 5
5
votes
2 answers

Lavaan SEM Ordinal and Categorical variables

In my model I have dichotomous variables (gender, car ownership) and ordinal variables (Income, Employment,...). My question is whether it is possible to construct latent variables using dichotomous and ordered variables? Is that a problem for the…
5
votes
1 answer

Output interpretation of lavaan in R concerning fit indices of robust estimator

I am doing a path analysis in R using the lavaan package. Because one of my endogenous variables is skewed I used a correction by Satorra & Bentler to receive robust estimators and standard errors. fit<-sem(trf.model1, data=data2,…
Mallku
  • 51
  • 1
  • 2
5
votes
1 answer

Can lavaan (SEM/CFA) be used to do factor analysis like factanal (EFA)

I understand that lavaan is designed to do SEM/CFA while the R function factanal does EFA. EFA and CFA seem very very similar, and so I wonder why I don't seem to be able to specify what to me looks like the same model in lavaan as I can fit in…
Corvus
  • 4,573
  • 1
  • 27
  • 58
5
votes
1 answer

How to interpret the fit of cfa (sem) outcome?

I did some CFA analyses (using R package Lavaan) on several scales in order to check the unidimensionalities. If I understood well scale 5, 6 and 7 can be considered a good fit because of the RMSEA < 0.08 and the CFI and TLI > 0.90. My question is…
5
votes
0 answers

How to identify a SEM with formative dependent variable (with R's lavaan package)?

I have a formative construct in a structural equation model (SEM) which I would like to estimate with the function sem in the lavaan package in R. Currently, the model is underidentified. I know about four different approaches for identifying the…
jhg
  • 305
  • 2
  • 4
  • 11
5
votes
1 answer

How to interpret this lavaan structural equation model?

I created following structural equation model from iris data set using lavaan package in R: How do I interpret these numbers. The output (of sem() function of lavaan package) is given below. It did not give any P values: lavaan (0.5-18) converged…
rnso
  • 8,893
  • 14
  • 50
  • 94
1
2 3
15 16