Questions tagged [lavaan]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
14 views

Interpreting total, direct and indirect effects in SEM

I'm running a SEM model with one mediator variable (cognitive ability). Using lavaan I report within the code the indirect and total effects to test them. However, I have some doubts on how to ...
2
votes
1answer
38 views

SEM model in lavaan: Can't compute standard errors

I was playing around in lavaan to bind together two simple models I previously tested on their own via simple regression analyses. I followed the tutorial provided on the following site: http://lavaan....
0
votes
1answer
12 views

Contradicting Fit Measures in SEM output - Lavaan

I am running a SEM model using lavaan package in R. The idea is to check different mediation effects of social class of origin, cognitive abilities, education and personality on the log-income of the ...
2
votes
1answer
48 views

Lavaan in R : some estimated lv variances are negative (higher order model)

I'm trying to fit a higher order model with five correlated secondary order factors and 14 primary order factors, but I receive following warning in R using cfa() ...
0
votes
0answers
16 views

Residual correlations between indicator variables from different factors?

I have a model with 3 latent variables, measured on 3 different waves (years) after each other with the same items. Now I want to make a cross-lagged SEM model to test whether there is a ...
0
votes
1answer
25 views

SEM: High SRMR in model with binary predictor. Other fit indices OK [closed]

In this post I may display severe lack of understanding in SEM and the math behind it so please be kind. I am testing the following structural model with lavaan using MLM (due to non-normality) with ...
1
vote
1answer
42 views

endogenous moderator in lavaan?

I am still learning about SEM, lavaan, and moderated mediation. My question is whether a moderator can be an endogenous variable - i.e. whether the variation in the moderator can be modelled as ...
1
vote
0answers
25 views

Obtain standardized factor scores for latent variables after CFA - Lavaan package in R

I want to predict the factor scores of latent variables from CFA, and use them as independent variables in another model (not SEM). Because the latent variables don't have a measurement unit, I want ...
1
vote
0answers
21 views

Mediation Analysis with Interaction of Mediators

I am not an expert in mediation analysis or structural equation modelling. I looked in the standard reference for mediation analysis (i.e., Hayes) and searched the forum and internet a bit and could ...
2
votes
1answer
49 views

Exploratory Factor Analysis (EFA) within a CFA framework in R: How to select anchor items?

In cases, data is ordered categorical, exploratory factor analysis (EFA) is best implemented using polychoric correlations and diagonally weighted least squares (for example, see here). To my ...
0
votes
0answers
30 views

How to create a data analysis template (lavaan parameter table) using simsem package R?

I am unfamiliar with simsem package for SEM simulations, and would like some help with it. I would like to create a data analysis template (lavaan parameter table) ...
2
votes
1answer
86 views

Any examples of Monte-Carlo analysis in R for sample size calculations for SEM?

I would like to calculate required sample size for my SEM model to achieve the power of at least 0.8. I read some articles that recommend using Monte-Carlo analysis in order to determine the sample ...
0
votes
0answers
62 views

How to interpret output of measurement invariance analysis

I try to test the measure invariance of a scale (with a 1-factor-structure) across two groups (N_1 = 645; N_2 = 127) and have problems with the application as well as the interpretation. I'm sure they'...
0
votes
0answers
10 views

Variation in path analysis coefficients over continuous gradient

I have a structural equation model which predicts a response (y) from a predictor (x) with a mediating effect (z), here specified in R lavaan syntax: ...
0
votes
1answer
33 views

Correct Estimator for Path Analysis/SEM Using Categorical Covariate

I'm currently building a path analysis model with model-based corrections for measurement error, using a latent variable structural equation model (i.e., each observed variable serves as a single ...
2
votes
1answer
66 views

Determining sample size for Structural Equation Model with R

I want to run and experiment to test the validity of a theoretical model. I have the structural and measurement model, but do not have previous data on any of the parameters. Is there a way I can find ...
0
votes
1answer
19 views

Confirmatory structural equation modelling to test predicted strengths of relationships?

I have two implicit measures (impl. attitude towards high-cal food and alcohol) and two explicit measures (high-cal food consumption and alcohol consumption). I want to confirm that my implicit ...
1
vote
1answer
44 views

SEM output with a DWLS est - non normal distributed variables: feedback, possible overfitting?

I have a sem model with non-normal distributed indicators measured with Likert-scale (7 points - agreement). I have 4 LVs and 1 observed (N=287, data collection still in progress). As variables in my ...
2
votes
1answer
122 views

How to specify latent variables for SEM with lavaan [closed]

I would like to use lavaan for SEM. Specifically I want to use the paper: "Original Article Maximum Likelihood for Cross-lagged Panel Models with Fixed Effects", by Paul D. Allison, Richard Williams, ...
0
votes
1answer
37 views

The amount of variables used in SEM models

I would like to use lavaan for SEM. I am have however struggling to get things running (I went through al the examples, but they always deal with these perfect datasets). The only thing that has ...
0
votes
1answer
40 views

Measurement invariance using 3 items

I want to examine measurement invariance across two nationalities for a construct measured with 3 items. First one is supposed to examine the configural fit before examining more restrictive models. ...
1
vote
1answer
39 views

CFA: scaling of measured variables/indicators

I'm running a latent variable analysis with: 166 observations 21 continuous variables using the R package lavaan A simple run of ...
0
votes
1answer
36 views

Can I import dataset with latent variables calculated, or do I need to define them in the syntax? [closed]

Lavaan tells you that you need to define latent variables for the analyses, however, I have imported a dataset from SPSS where I already created the latent variables, as this is easier than doing it ...
0
votes
1answer
32 views

SEM: Comparing models when removing paths

I'm developing an SEM model for a study I've recently run. Essentially, I have 6 factors that are shown from previous research to predict one's performance in a specific task. My data is the ...
0
votes
0answers
21 views

Evaluating mediator effect, through SEM model selection with AIC [duplicate]

I am new to SEM and the lavaan R package, so perhaps this is a basic question. I have social media data with three variables: ...
0
votes
0answers
30 views

How to test nomological validity with lavaan?

in my understanding, I need to test nomological validity with SEM. But what exactly should I look at in e.g. summary(fit1, standardized=TRUE, fit.measures=TRUE)? Code for reference: ...
1
vote
0answers
48 views

Negative degrees of freedom in multilevel SEM

Can someone please help me understand why I have negative amount of degrees of freedom in my output? I am doing a multilevel sem in lavaan and have 1 level 2 variable and 3 level 1 variables Thanks! <...
0
votes
0answers
79 views

Standardizing variables in lavaan (cross-lagged panel model)

I am running cross-lagged panel models with lavaan (3 time points, with and without random intercepts, as shown here https://jflournoy.github.io/2017/10/20/riclpm-lavaan-demo/ ). I noticed that when I ...
0
votes
0answers
117 views

Fix latent variable endogenous variance (NOT residual variance) in Lavaan

I am fitting some models using lavaan. I have a number of latent variables (specifically I am fitting ACE behavioral genetics models with multiple phenotypes). For the model to be interpretable the ...
1
vote
3answers
375 views

lavaan WLSMV estimator: are results reliable when number of observations is too small to compute Gamma?

I run CFA (confirmatory factor analysis) with WLSMV estimator (since my data are ordinal) in lavaan and I get the following warning message: ...
0
votes
0answers
67 views

factor scores from CFA in lavaan

I have the covariance matrix and an already fitted lavaan object (and/or model) using the cov matrix. But, I do not have the raw data. Is there a way I can calculate the factor scores?
0
votes
1answer
131 views

Path Analysis with multiple mediators and predictors

I recently started studying SEMs and path analysis in particular to analyze a data set. I have the following model, and I want to make sure I specified it correctly with ...
0
votes
0answers
25 views

How to estimate a measurement model (CFA) with both latent and observed variables affecting measurements in lavaan?

I'd like to estimate a CFA model where measures are determined by both latent variables and other observed variables. I can do this by creating place-holding latent variables for the observed ...
0
votes
1answer
71 views

how can I perform confirmatory factor analysis when covariance matrix contains missing values?

I have dataset of test items which were administered in blocks. As a result, not all students answered each test item and there are some pairs of items for which no observations are shared, ...
0
votes
1answer
55 views

how to use lavaan for multiple regression mediation

I am using Lavaan for mediation as it is very easy to customize your work but i am confused about indirect effect and total effect in case of multiple regression Example: ...
0
votes
0answers
45 views

Variance components model: proportions of within and between variance are off?

I was hoping someone could help me see what I'm obviously missing here. I simulated some clustered data and, in the sense of a variance component model, wanted to take a look at the variances of the ...
1
vote
0answers
77 views

Do I report the pvalue of the standardized or unstandardized factor loading in CFA/SEM?

Using lavaan, for a simple CFA or SEM with measurement tools, you can use parameterEstimates(fit, standardized=TRUE) to get the standardized factor loadings for the ...
2
votes
0answers
94 views

Longitudinal CFA/SEM with autocorrelated/autoregressed indicators (in R, better with lavaan)

The problem is, I am trying to fit a multilevel factor model to highly autocorrelated (in fact, autoregressive) indicators. More specifically, I have multiple measurements (60-70) per person (5-10 ...
0
votes
0answers
667 views

Latent variable interaction: different number of indicators 4 vs 1

I am trying to calculate a latent variable interaction using the unconstrained product indicator approach (Marsh 2004) with double centering (Lin et al. 2010). My data: two latent predictor ...
2
votes
0answers
44 views

Why item discriminations are missing in IRT GRM, estimated as a part of the Structural Equation Model? [closed]

I have run a Structural Equation Model that has four latent constructs (FI, SC, EM and RB) in R. All of the factors are continuous. Meanwhile, indicators are all ordered categorical variables measured ...
1
vote
1answer
215 views

Help moving forward after modIndices() in lavaan

I’m running a model in SEM using lavaan. I’ve really run into a puzzle I can’t quite seem to solve and I would love to tap into everyone’s expertise to help provide some direction. Below I’ve added ...
0
votes
0answers
14 views

How does explained variance in within level variables influence across-level-relations in multilevel SEMs?

Firstofall: I am sorry I cannot provide a minimal example code. I am trying my best to generalize the problem, but yet I just couldn't recreate it with dummy data. I try to provide any information ...
1
vote
1answer
70 views

Disagreement between p-values and bias corrected CI in path analysis

I am conducting a path analysis that include estimation of indirect effects (i.e. mediation). For each indirect effect specified in the model (a1*b1), I have both a p-value and a 95% boostrapped CI. ...
0
votes
0answers
370 views

How to check SEM assumptions?

This question is related to SEMs that include latent variables e those that not include in lavaan package. SEM assumes normality/multivariate normality, but it is being very difficult to found a way ...
0
votes
0answers
46 views

Linear Regression Perfectly Predicts Latent Variables

I'm having trouble understanding the relationship between the latent variables produced by the CFA function in R's Lavaan package, and linear regression. I have used one of Lavaan's built-in data ...
0
votes
1answer
122 views

How do I specify a lavaan sem model with more than one single-indicator factor?

I am trying to specify a lavaan CFA that has some factors with three or more indicators, one factor with two indicators, and two factors with one indicator. For the single indicator factors, I tried ...
1
vote
1answer
496 views

Why does my SEM ('lavaan') return covariance estimates for all pairwise variable combinations that were not specified in the model?

I specified the following model for SEM analysis using the 'lavaan' package in R. I want to specify a covariance between two observed variables (livestock and human occupancy). This is the only ...
0
votes
0answers
18 views

Creating a weighted composite score from standardized lavaan latent beta weights that retains the scale of the original measures?

I did a latent factor analysis in Lavaan which had a good fit and gave me the following estimates of standardized beta weights for three latent variables called Eta1, Eta2, and Eta3. ...
0
votes
0answers
116 views

Acceptable CFI but poor TLI

I'm working on a path analysis using lavaan in R. Here is my model fit result: Chi square: >.05 Confirmatory Fit Index (CFI): 0.94 Tucker Lewis Index (TLI): 0.86 Root Mean Square Error of ...
0
votes
0answers
80 views

Lavaan LavPredict when samples have 0 variance

I am using Lavaan to perform a Confirmatory Factor Analysis on a dataset of 10,000 League of Legends games. The features of the dataset are certain variables of the games like kills, deaths, gold ...