# latent growth curves: lavaan vs LISREL different results

I'm reading Schumacker and Lomax's A Beginner's Guide to Structural Equation Modeling (2016, 4th edition) and I'm trying to reproduce a latent growth model (LGM) in lavaan that the authors ran in LISREL, but I'm getting very different results. In every other case that wasn't a LGM, I was able to reproduce the results from the book almost exactly with lavaan, but I can't get a single LGM to work right (this is one of 3 that I've tried).

These are the results I should be getting :
and they're obtained from the following LISREL scritp :

Latent Growth Model
Observed Variables: age11 age12 age13 age14 age15
Sample size 168
Correlation matrix
1.000
.161 1.000
.408 .348 1.000
.373 .269 .411 1.000
.254 .143 .276 .705 1.000
Means .201 .226 .326 .417 .446
Standard deviations .178 .199 .269 .293 .296
Latent Variables: slope intercept
Relationships:
age11 = CONST + 0 * slope + 1 * intercept
age12 = CONST + 1 * slope + 1 * intercept
age13 = CONST + 2 * slope + 1 * intercept
age14 = CONST + 3 * slope + 1 * intercept
age15 = CONST + 4 * slope + 1 * intercept
Let slope and intercept correlate
Let error covariance between age11 and age12 correlate
Let error covariance between age14 and age15 correlate
Path Diagram
End of Problem

When I run this in a student version of LISREL, I get exactly the same results.

Here's what I do in R (a1 = age1, a2 = age2, etc.):
Provided sample correlation matrix :

``````sample.corr2 <- '
1.000
.161 1.000
.408 .348 1.000
.373 .269 .411 1.000
.254 .143 .276 .705 1.000
'
``````

Standard deviation and means of the variables:

``````SD2 <- c(0.178, 0.199, 0.269, 0.293, 0.296)
samp.means2 <- c(.201, .226, .326, .417, .446)

``````

Preparing the matrix, and assigning variable names :

``````matrix.sym2 <- getCov(sample.corr2, names = c("a1", "a2", "a3",
"a4", "a5"))
``````

The model :

``````GrowthMod <- '
slope =~0*a1 + 1*a2 + 2*a3 +3*a4 + 4*a5
intercept =~ 1*a1 + 1*a2+ 1*a3+ 1*a4 + 1*a5

intercept ~~ slope

a1 ~~ a2
a4 ~~ a5
'
``````

Fitting the model and getting fit info :

``````fit <- growth (GrowthMod, sample.cov = matrix.sym2,
sample.nobs = 168, sample.mean = samp.means2,
estimator = "ML")
summary (fit, fit.measures = TRUE, standardize = TRUE, rsq=TRUE)
``````

Standardized results of fit :

slope =~
a1 0.000
a2 0.169
a3 0.349
a4 0.531
a5 0.685
intercept =~
a1 0.766
a2 0.743
a3 0.767
a4 0.779
a5 0.754

Covariances:
slope ~~ intercept -0.698
.a1 ~~ .a2 -0.627
.a4 ~~ .a5 0.588

The intercept and slope loadings are off, but so are other details, because I get a chi-square of 7.27, df = 8, p = 0.507, and RMSEA = 0. The covariance between a1 and a2, and between a4 and a5 are not super close to the right values.

Since I have the means and standard deviations, I thought "why not see what happens if I turn this correlation matrix into a covariance matrix and use that instead?"

``````Cmat2 <- getCov(sample.corr2)

Dmat2 = diag(SD2)
covmat2 = Dmat2%*%Cmat2%*%Dmat2
rownames(covmat2) <- c("a1", "a2", "a3", "a4", "a5")
colnames(covmat2) <- rownames(covmat2)
``````

LISREL gave the covariance matrix in the output, which is pretty much identical to this one (except rounded up a bit).
So I run a new growth model with this covariance matrix :

``````fit2 <- growth (GrowthMod, sample.cov = covmat2,
sample.nobs = 168, sample.mean = samp.means2,
mean.structures = TRUE,
estimator = "ML")

summary (fit2, fit.measures = TRUE, standardize = TRUE, rsq=TRUE)
``````

Now I get an error saying that the covariance matrix of the residuals of the observed variables (theta) is not positive definite (it's the covariance between a1 and a2 that's problematic).

Standardized results of fit2 :

slope =~
a1 0.000
a2 0.227
a3 0.351
a4 0.490
a5 0.625
intercept =~
a1 0.922
a2 0.789
a3 0.611
a4 0.568>
a5 0.543

Covariances:
slope ~~ intercept -0.532
.a1 ~~ .a2 -1.694
.a4 ~~ .a5 0.580

The loadings of slope intercept, and the covariance between slope and intercept match almost perfectly those from the book.
This time, chi-square = 21.997, df = 8, p = 0,005, RMSEA = 0.102. The covariance between a1 and a2, and a4 and a5 are WAY off.

I'm lost and very confused at this point. What am I doing wrong? I can only find simple examples of LGM using lavaan, and nothing I find seems to give me an indication of what's causing my issue.
I can do this in LISREL, but I really want to be able to be able to do this in R.
Any help would be greatly appreciated!

Bonus (and less pressing) question: I can see that using a covariance matrix can give different results than if a correlation matrix is used... So when should I use one over another?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.