# Tag Info

17

1) The baseline is a null model, typically in which all of your observed variables are constrained to covary with no other variables (put another way, the covariances are fixed to 0)--just individual variances are estimated. This is what is often taken as a 'reasonable' worst-possible fitting model, against which your fitted model is compared in order to ...

12

It is possible to do EFA in a CFA framework. This is sometimes called "E/CFA". A nice discussion of this can be found in: Brown, T. A. (2006). Confirmatory factor analysis for applied research. New York: Guilford Press. For this to work, you need to have an "anchor item" for each factor, for which there are no cross-loadings. Looking at the results from ...

9

They're the same model. It's useful to be able to define a latent variable as a composite outcome where that variable only has composite indicators. If you don't have: f1 =~ y1 + y2 + y3 You can't put: f1 ~ x1 + x2 + x3 But you can have: f1 <~ x1 + x2 + x3

7

This question has received a number of views since it was first posed, but no answers. Here is a solution, which may be useful to future readers of this question. To demonstrate it works I will first run a cfa() model in using the HolzingerSwineford1939. The model is taken from the lavaan tutorial page. library(lavaan) dat<-data.frame(...

7

The model is not identified, which means there is no unique solution to the estimation problem. Identification is a challenging topic, one that is often overlooked. First, your graphical model is incorrect. You have manifest variables pointing to the latent variables, when in your model, the manifest variables measure the latent variable. Second, the cause ...

6

The variance is a statistic indeed, but why rely on a package to answer that for you rather than your knowledge of statistics? For instance, you might be interested in parametric variance estimation in which you might assume (or test assumptions) of certain distributions in the data you estimate (parametric approach). You can also go for non-parametric ...

6

I posted this question in another location and was provided the answer by Terry Jorgenson. Question and answer: I would like to calculate the conditional indirect effects of X on Y given a set of values for the moderator W. Both X and the moderator are continuous. Could you provide some direction for structuring the model syntax? Assuming X and W are ...

6

Your model is not identified. That means that Lavaan cannot find a unique solution, and cannot compute standard errors. Because it can't find a unique solution, it's finishing in different places. [Very simple example of identification: $x + y = 5$ There are many (an infinite number) of solutions to this equation for x and y, and they're all equally good, ...

6

A CFI of 0.9 is generally considered to not be very good (nowadays?). So saying that a CFI that is below 0.9 is "almost a good fit" is (IMHO) stretching the truth somewhat. So why do you have good RMSEA and poor CFI? It's because the two indices test fit in different ways. RMSEA is based on chi-square - lower chi-square means lower RMSEA. The CFI tests fit ...

6

Moving comments above to an answer: You really can't say anything at all about this model. On top of being completely unidentified it is badly broken (negative variance terms abound). So I would throw this model out and try something completely different. Edit: This model is vastly over-identified and hence it is not unique (therefore, it's likelihood ...

5

I don't think it's hard to count the df for that model. You have 125 variables. (!!!) So you have $k(k+1)/2 = 7875$ moments in the distribution. You're estimating: 125 error variances, 125 loadings, and the covariances of the latent variables. You have 20 latent variables, so you have 190 covariances. That makes $125 + 125 + 190 = 440$ parameters to ...

4

The cfa() function is a wrapper for lavaan, which (among other things) adds the arguments auto.fix.first = TRUE auto.var = TRUE Changing your model type to CFA changes a few cosmetic things, but not the basic model. Because the lavaan() command has not put these in, you need to add the arguments, or add the appropriate parameters to the model. lavaan(...

4

Ideally, invariance tests would culminate in a model that constrained the path between the "mediating" factor and the outcome factor to equality across groups. Global $\chi^2$ values are used to evaluate relative fit between models representing different levels of invariance.$^1$ Assuming measurement invariance has been established,$^2$ testing for mediation ...

4

You specify in the comments that your actual interest is just in running models that do and don't include a correlation between the random intercept and slope, using lmer() if possible and lavaan if needed. You can make random effects independent (not correlated) with lme4::lmer(): library(lme4) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) ...

4

The thresholds are on a logit scale, so it's the log-odds (just like in logistic regression, or ordinal logistic regression). The thresholds are just like the intercept in a regular regression model. They give the expected log odds of a value, given that the predictors (including latents) are equal to zero. If in a model with continuous variables, you ...

4

It doesn't make any difference where your model comes from. Lavaan doesn't know that the model comes form an EFA, or that you used oblimin (or any other) rotation. You should always include correlations between your factors, unless you have a very good reason to believe that they are correlated zero. Lavaan includes factor covariances (and factor ...

4

A few suggestions/clarifications before directly addressing your questions. First, a significant $\chi^2$ doesn't indicate poor fit; it indicates that you have rejected the null of perfect fit (i.e., $\sum$ = $S$). Kline (2015) aside, most SEM specialists (e.g., Brown, 2006; Finch & French, 2015; Hu & Bentler, 1995; Little, 2013; MacCallum & ...

4

Adding a residual correlation is equivalent to adding an additional factor. If the loadings are reduce when you add this, it's because these items are in a separate factor. (Perhaps post your code and results? You say "I decided to allow residuals of these items to correlate with each other. " but I don't see how you can do that and keep the model ...

4

Yes, there are special ways to handle ordinal and binary variables in Lavaan, you can enter them as numeric variables then when you use the sem() function you specify which are ordinal using the ordered argument. I wrote up a longer response but then came across this link... That should give you everything you need to know.

4

Structural equation modeling relies on means and the variance covariance matrix. For ordinal data, the software will calculate polychoric correlations to try to recover the relation between the categorical indicators under the assumption that they are polychotomized realizations of continuous variables. And these continuous variables are multivariate normal. ...

4

You will want to ensure an adequate sample size when variability of a variable is unequal across the range of values of a second variable that predicts it. If a regression model is able to consistently predict across all values a smaller sample size is possible, where the predictions are poor at one end or the other (because it's ordinal) then a larger ...

4

The model with the factor is presumably nested within the model without the factor, so you can just perform a simple likelihood ratio test. Fit the model with the factor and the model without the factor, then use lavTestLRT to compare them. If the test is significant, there is evidence that the model with the factor fits better than the model without it.

4

I think the best walkthrough of how to sample size plan using lavaan and simsem I have ever read was in a very short and very accessible text called Latent Variable Modeling Using R: A Step-by-Step Guide by A. Alexander Beaujean. His examples are admittedly relatively simple, but they should provide an excellent basis to start from when thinking about a ...

3

You can, but first you need to constrain the parameters to be equal across groups. Change your model to: HS.model <- ' visual =~ x1 + c(a, a) * x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 ' fit <- cfa(HS.model, data = HolzingerSwineford1939, group = "school") summary(fit) And I have constrained the loading for x2 to be equal across ...

3

I hope that you have found an answer at this point, but for the viewers who still want to know how to do this in the lavaan package, here's how. To start I simulated some data: > head(dat) A1 A2 A3 A4 B1 B2 B3 C1 C2 D1 1 1.6785322 0.9257293 -0.39660571 -0.5171069 1....

3

Your estimated model looks like: \begin{align} \sqrt{V_2} &= a_2 \left( 1+V_1 \right)^{b_2} + \epsilon_2 \\ \sqrt{V_3} &= a_3 \left( 1+V_2 \right)^{b_3} + \epsilon_3 \\ \ln{\left(1+V_4\right)} &= a_4 + b_4 V_2 + c_4 V_3 + \epsilon_4 \\ \end{align} What you are interested in calculating is $\frac{d V_4}{d V_1}$. To do this, we are just going to ...

3

Means and intercepts of latent variables are kind of weird. It looks to me like you've constrained the means of the intercepts to zero. If you haven't, then model is not identified. You estimate the intercepts freely with: A1 ~ 1 I don't think you did that. (But post your output if you want me to be sure.) Means (and intercepts) of latent variables are ...

3

The mean of the free latent is the difference between the male and female mean. So the female mean is 0.15 points lower than the male for F1, and 0.2 points lower for F2. These are on the scale of the units that were used to identify the variances - so they are in units of a 5 point scale and a 2 point scale. Standardization can be weird. I don't know what ...

3

If you check the documentation for lavaan-class, you will see a reference to Standardized Residuals in Mplus. This document explains how the normalized and standardized residuals computed in Mplus and I think lavaan follows Mplus in this computation (see documentation of lavaan-class: "For more information about the normalized and standardized residuals, ...

3

Welcome to CV, Michelle. The formula you have supplied is used to calculate how many unique variances and covariances there are in your entire matrix of observed variables--it includes all variables in your model. These are the the "known" pieces of statistical information, if you will, for your model. The form of the model you specify has no impact on this ...

Only top voted, non community-wiki answers of a minimum length are eligible