Questions tagged [lavaan]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
16 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
0answers
19 views

Mathematical functions in lavaan's lavTestWald function [migrated]

I'm using the lavaan package in R and want to use lavaan::lavTestWald to test the fit of a ...
0
votes
1answer
18 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
16 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
20 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
26 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
16 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
35 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 ...
0
votes
0answers
28 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
37 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
49 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
20 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
36 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
17 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
40 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
26 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
42 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
417 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
40 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
58 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
12 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
46 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
156 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
20 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
40 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
153 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
10 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
50 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
38 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 ...
0
votes
1answer
71 views

Evaluating measurement invariance with lavaan and ordered data

I am running a measurement invariance in lavaan in R. I am comparing a measure of sociocultural appearance pressures across White and Black women. Because this is a 5-point scale, I am treating the ...
0
votes
0answers
17 views

Testing parameter significance vs model fit

In one of our studies we test a mediation hypothesis in a longitudinal (it's actually panel data) study with 4 measurement waves. We test a setup similar to one outlined by Cole & Maxwell (2003) ...
0
votes
0answers
29 views

Analysing panel data - looking for hypothesized mediation and moderation effects

Good afternoon, I'd like to ask you for some help in finding a (hopefully citable) way of analyzing panel data when looking for mediation and moderation effects. Problem I have is that my measured ...
0
votes
0answers
42 views

Reasons for markedly different results using MLR vs. WLSMV in CFA?

A scale I examined has a 6-point likert scale and detailed anchor points. In addition, the items are distributed skew. I did a CFA with MLR as well as with WLSMV. With WLSMV as estimator, the scale ...
0
votes
0answers
101 views

lavaan WARNING: model has NOT converged

I'm runing a mediational Path analysis as below. ...
0
votes
0answers
28 views

What type of transformation for Latent Growth Curve analysis with lavaan when observed variances are over 40,000,000?

Edit: I believe a linear transformation is just fine - divide each number by 100 for example. Just make sure you change back your units when you are interpreting the output! In fact, when I do this, ...
0
votes
1answer
29 views

Path analysis of latent variable relationships over time for hypothesis testing

Consider that I have a sample of 30 people (my real data are much bigger), and we ask them how often the would like to eat three types of food (candy, vegetables, and meat) at four points in their ...
2
votes
0answers
144 views

How to compare non-nested models (with different number of items) in CFA?

I investigate the factor structur of an existing scale in a data set with N = 714 (using lavaan, R). In this context I would like to compare to alternative models: Model 1: Two factors with 5 items ...
1
vote
1answer
133 views

Constraining latent variance of the slope across groups in lavaan

lavaan provides a function for measuring measurement invariance (measurementInvariance()). However, let's say that I want to ...
1
vote
1answer
92 views

Interpreting effect sizes in cross-lagged -auto-regressive models

I am running an auto-regressive, cross-lagged panel model between three variables (individual survey responses) to understand the over-time dynamics between them. But I am trying to make sure I ...
0
votes
1answer
165 views

CFA lavaan - reasons for bad fit?

I investigate the psychometric properties of an existing scale in a data set with N = 714. The structure originally assumed by the authors is the following, from which different index scores (...
0
votes
0answers
81 views

Problem with assessing bidirectional effects

My dataset has four endogenous variables, namely, employment (emp), addiction (addict), depression (...
1
vote
1answer
86 views

Understanding the non-identifiability and handling of categorical variables in SEM

I have three questions about SEM and I'll ask the questions using an example that I have been working with. The dataset has employment (emp), addiction (...
1
vote
1answer
32 views

Problems evaluating whether there are structural group differences in my path analysis model

I want to evaluate if I there are structural group differences (two groups) in my path analysis model. I compared the models with and without allowing group differences (lavaan:: sem(..., group =)): ...
1
vote
0answers
306 views

Mediation: Significant indirect effect, but total effect nonsignificant, no inconsistent mediation

I conducted a mediation analysis via lavaan. For estimating all effects, I used 10,000 bootstraps. I have problems interpeting my results. Path a is negative and significant. Path b is positive ...
2
votes
0answers
37 views

Double Mediation?

can anyone help me with what this R (package lavaan) syntax? I got a question: Is it correct that a kind of nested multiple mediation is tested with this code (X = "predictor", XM1 = "predictor 2" in "...
1
vote
0answers
86 views

Warning message when cluster-argument is included in lavaan .06-2

I have a sample of 529 people who are in 50 clusters. I'm not interested in any multilevel question but I would like to get cluster-robust standard errors for my SEM. Therefore, I included the cluster-...
0
votes
1answer
43 views

CFA Interpretation

I am trying to teach myself how to do CFA on the fly, with no formal training in statistical analysis (my first grad course on quantitative analysis is next semester). I believe that I have figured ...
1
vote
1answer
66 views

Residual variance of a variable in Structured Equation Modeling

I am following lavaan package in R to implement SEM. I have a doubt for residual correlation equation. http://lavaan.ugent.be/tutorial/sem.html in general, in residual correlations equations, y1 ~~...
2
votes
1answer
28 views

Test of difference maximum likelihood parameters SEM R

I have a structural equation model implemented in R 3.4.4 using lavaan 0.6-1 and estimated on two different subgroups using a robust maximum likelihood estimator. Now I want to compare the parameters ...
1
vote
1answer
231 views

Fitting issues when including certain combination of variables with lavaan::cfa()

I am trying to fit 13 ordinal indicator variables to a single factor, but there are three of them that will result in a warning when they're included simultaneously. You can find the code below (data ...