2  No growth, linear and quadratic growth models

In Chapter 1 we looked at the data before fitting anything: the means and spread of the loneliness scores at each wave, the correlations across waves, the missing data, and the choice of time scores. In this chapter we fit the first three growth models to those five waves. We start with the simplest model, in which nothing changes over time, and then add a linear growth model and a quadratic growth model. Each model contains the one before it as a special case, which allows us to ask at every step whether the added part is needed.

2.1 Why start with simple models

A growth model is a statement about how the average level of the outcome moves over time and about how much people differ around that average. We start with the simplest model and add one feature at a time, so each addition answers one question.

The three models in this chapter answer three questions.

  1. Is there a stable level of loneliness and do participants differ in that level, with no systematic change over time? (no growth model)
  2. Does the average level change at a constant rate and do participants differ in their rate of change? (linear growth model)
  3. Does the rate of change itself change over the waves? (quadratic growth model)

The ideas behind these models come from the latent curve framework, in which a growth model is a confirmatory factor model with the loadings tied to time (Meredith & Tisak, 1990). The structural equation perspective is treated in full by Bollen & Curran (2006). Introductions with applied examples are given by Duncan & Duncan (2004) and Preacher et al. (2008). We use the same dataset and the same five waves for all three models, so any difference between them is a difference in the model and not in the data.

2.2 The data and the time scores

The dataset has 442 rows. The loneliness scores lone1 to lone5 were measured at five waves in 2015, 2016, 2018, 2019 and 2021. The gaps between waves are 1, 2, 1 and 2 years, and we therefore use the time scores 0, 1, 3, 4 and 6, with 2015 as time 0 and one unit equal to one year. The reasons were given in Chapter 1. In all three models below, the time scores enter the model as fixed factor loadings.

In the workshop script growth() is called with its default settings, which means listwise deletion. Of the 442 rows, 321 have scores on all five waves, and all three models are estimated on these 321 participants. The output reports this as “Used 321, Total 442”. Listwise deletion, full information maximum likelihood and the missing data assumptions are explained in Chapter 1. The loneliness scores are also skewed (Chapter 1), which matters for the chi-square tests of fit and for the comparison of the models below.

2.3 Model 1: the no growth model

2.3.1 The idea in plain language

The no growth model, also called the intercept-only model, is the reduced model of this chapter. It says that each participant has a stable true level of loneliness that does not change over the five waves. Participants may differ in that level, and the observed scores at each wave differ from the participant’s level only because of measurement error and occasional fluctuation. If this model fitted well, there would be no reason to look for growth.

The model has one growth factor, the intercept factor. Its mean is the average level across participants and its variance tells us how much participants differ in their level. Each wave has its own residual variance.

2.3.2 A concrete example

For the loneliness scores, the no growth model says that a participant who scores high at the first wave has a high true level at all later waves, and that the mean of the five wave means is a sufficient description of the average. We know from the descriptive output that the wave means are not identical, so the model is likely too simple. We fit it anyway because it is the baseline against which every other model in the chapter is compared.

2.3.3 The formal model

For participant \(i\) at wave \(t\), the observed score is

\[ y_{ti} = \eta_{0i} + \varepsilon_{ti}, \]

where \(\eta_{0i}\) is the intercept factor and \(\varepsilon_{ti}\) is the residual with variance \(\theta_t\) (Bollen & Curran, 2006). The intercept factor has a mean \(\alpha_0\) and a variance \(\psi_{00}\), so that \(\eta_{0i} = \alpha_0 + \zeta_{0i}\). All five loadings of the intercept factor are fixed to 1. Figure 2.1 shows the path diagram from the workshop.

Path diagram of the no growth model with one intercept factor and five observed variables
Figure 2.1: The no growth model as a path diagram. One latent intercept factor (I) with all five loadings fixed to 1.0 predicts the five observed scores. Each observed score has its own residual, drawn as a short arrow. The third box is labeled y2i on the slide and stands for the third wave. Source: workshop slides (Anyan, 2023).

2.3.4 R implementation

In the workshop syntax the loadings of the intercept factor are fixed to 1 and nothing else is specified. The growth factor mean and the variances are added by growth().

Code
nogrowth <- ' i =~ 1*lone1 + 1*lone2 + 1*lone3 + 1*lone4 + 1*lone5'
fit_nogrowth <- growth(nogrowth, data = data)
summary(fit_nogrowth, fit.measures = TRUE)
lavaan 0.6.17 ended normally after 37 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         7

                                                  Used       Total
  Number of observations                           321         442

Model Test User Model:
                                                      
  Test statistic                               186.433
  Degrees of freedom                                13
  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                               451.170
  Degrees of freedom                                10
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.607
  Tucker-Lewis Index (TLI)                       0.698

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -814.634
  Loglikelihood unrestricted model (H1)       -721.418
                                                      
  Akaike (AIC)                                1643.269
  Bayesian (BIC)                              1669.669
  Sample-size adjusted Bayesian (SABIC)       1647.466

Root Mean Square Error of Approximation:

  RMSEA                                          0.204
  90 Percent confidence interval - lower         0.179
  90 Percent confidence interval - upper         0.230
  P-value H_0: RMSEA <= 0.050                    0.000
  P-value H_0: RMSEA >= 0.080                    1.000

Standardized Root Mean Square Residual:

  SRMR                                           0.172

Parameter Estimates:

  Standard errors                             Standard
  Information                                 Expected
  Information saturated (h1) model          Structured

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)
  i =~                                                
    lone1             1.000                           
    lone2             1.000                           
    lone3             1.000                           
    lone4             1.000                           
    lone5             1.000                           

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 1.398    0.018   79.816    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .lone1             0.109    0.010   10.537    0.000
   .lone2             0.142    0.013   11.035    0.000
   .lone3             0.167    0.015   11.279    0.000
   .lone4             0.112    0.011   10.587    0.000
   .lone5             0.092    0.009   10.119    0.000
    i                 0.075    0.008    9.531    0.000

2.3.5 Understanding the output

The header shows that 321 of 442 rows were used. The model has 7 free parameters: the mean and variance of the intercept factor and the five residual variances. The five observed means, five variances and ten covariances give 20 pieces of information, which leaves 13 degrees of freedom. The chi-square test is 186.433 on 13 degrees of freedom with p < .001, which means that the model-implied means and covariances differ from the observed ones by more than sampling error would explain. The CFI is .607, the TLI is .698, the RMSEA is .204 (90% CI .179 to .230) and the SRMR is .172. Guidelines for these indices are discussed in Hu & Bentler (1999). They are not fixed rules, but values of this size are far from the usual cut-offs. The no growth model does not describe these data well.

The intercept mean is 1.398 and the variance of the intercept factor is 0.075, both with p < .001. The residual variances range from 0.092 to 0.167. Figure 2.2 shows the same model with the results as they were reported in the workshop. These numbers were estimated in Mplus. The R output above is the one used in this chapter, and the two agree for the fit statistics, the intercept mean and the intercept variance. The slide prints the largest residual variance as 1.167. This is a typing mistake in the workshop slide. The correct value is 0.167, as the R output shows, and we use that value throughout.

No growth model path diagram with model fit statistics and parameter estimates
Figure 2.2: Results of the no growth model, as shown in the workshop. The values come from Mplus and are used here only to compare with the R output above. One residual variance is printed as 1.167 on the slide. This is a typing mistake and the correct value is 0.167. Source: workshop slides (Anyan, 2023).

2.3.6 Interpretation

Participants are estimated to have an average level of 1.398 on the original score metric. The intercept variance of 0.075 is clearly different from zero, so there are between-person differences in level. These statements describe this dataset and this model. Since the fit is poor, we do not give weight to the exact size of the estimates. The poor fit tells us that a single stable level for each participant is not enough to reproduce the pattern of means and covariances across the five waves.

2.3.7 What this model answers and what it cannot tell

The no growth model answers the question of whether participants differ in a stable level. It cannot say anything about change, because change is excluded by design. Its main use is as the reference point for the next model.

2.4 Model 2: the linear growth model

2.4.1 The idea in plain language

If scores change over time at a constant rate, a second growth factor is needed. The slope factor describes the rate of change per time unit. Participants may have different starting levels and different rates of change, so both growth factors have a variance. The intercept and the slope may also be related, and this relation is estimated as a covariance.

2.4.2 A concrete example

The linear model describes each participant by a straight line over the years 2015 to 2021. The intercept factor is the expected score in 2015, which is time 0. The slope factor is the expected change in score per year. The model asks whether the average slope differs from zero and whether participants differ in their slopes.

2.4.3 The formal model

\[ y_{ti} = \eta_{0i} + \lambda_t \, \eta_{1i} + \varepsilon_{ti}, \qquad \lambda_t = 0, 1, 3, 4, 6, \]

with \(\eta_{0i} = \alpha_0 + \zeta_{0i}\) and \(\eta_{1i} = \alpha_1 + \zeta_{1i}\) (Bollen & Curran, 2006). The model has two means (\(\alpha_0\), \(\alpha_1\)), two variances (\(\psi_{00}\), \(\psi_{11}\)), one covariance (\(\psi_{01}\)) and the five residual variances. Figure 2.3 shows the diagram.

Path diagram of the linear growth model with an intercept factor, a slope factor and their covariance
Figure 2.3: The linear growth model as a path diagram. The intercept factor (I) has loadings of 1.0 on all five scores. The slope factor (S) has loadings of 0.0, 1.0, 3.0, 4.0 and 6.0, which are the time scores. The curved arrow between I and S is the covariance between the two growth factors. Source: workshop slides (Anyan, 2023).

2.4.4 R implementation

The only change in the syntax is the second line, which adds the slope factor with the time scores as loadings.

Code
linear <- ' i =~ 1*lone1 + 1*lone2 + 1*lone3 + 1*lone4 + 1*lone5
           s =~ 0*lone1 + 1*lone2 + 3*lone3 + 4*lone4 + 6*lone5'
fit_linear <- growth(linear, data = data)
summary(fit_linear, fit.measures = TRUE)
lavaan 0.6.17 ended normally after 49 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10

                                                  Used       Total
  Number of observations                           321         442

Model Test User Model:
                                                      
  Test statistic                                75.244
  Degrees of freedom                                10
  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                               451.170
  Degrees of freedom                                10
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.852
  Tucker-Lewis Index (TLI)                       0.852

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -759.040
  Loglikelihood unrestricted model (H1)       -721.418
                                                      
  Akaike (AIC)                                1538.080
  Bayesian (BIC)                              1575.795
  Sample-size adjusted Bayesian (SABIC)       1544.076

Root Mean Square Error of Approximation:

  RMSEA                                          0.143
  90 Percent confidence interval - lower         0.113
  90 Percent confidence interval - upper         0.174
  P-value H_0: RMSEA <= 0.050                    0.000
  P-value H_0: RMSEA >= 0.080                    1.000

Standardized Root Mean Square Residual:

  SRMR                                           0.097

Parameter Estimates:

  Standard errors                             Standard
  Information                                 Expected
  Information saturated (h1) model          Structured

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)
  i =~                                                
    lone1             1.000                           
    lone2             1.000                           
    lone3             1.000                           
    lone4             1.000                           
    lone5             1.000                           
  s =~                                                
    lone1             0.000                           
    lone2             1.000                           
    lone3             3.000                           
    lone4             4.000                           
    lone5             6.000                           

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)
  i ~~                                                
    s                -0.015    0.002   -6.246    0.000

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 1.466    0.024   62.031    0.000
    s                -0.025    0.004   -5.784    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .lone1             0.059    0.010    5.761    0.000
   .lone2             0.114    0.011   10.114    0.000
   .lone3             0.172    0.015   11.659    0.000
   .lone4             0.114    0.010   11.066    0.000
   .lone5             0.047    0.010    4.929    0.000
    i                 0.139    0.015    9.310    0.000
    s                 0.003    0.001    5.839    0.000

2.4.5 Understanding the output

The linear model has 10 free parameters and 10 degrees of freedom. The chi-square is 75.244 with p < .001. The CFI is .852, the TLI is .852, the RMSEA is .143 (90% CI .113 to .174) and the SRMR is .097. The fit is clearly better than that of the no growth model, but it still does not reach the usual guidelines. The number of participants used is again 321.

The estimates show a mean intercept of 1.466 (SE = 0.024) and a mean slope of -0.025 (SE = 0.004, p < .001). The variance of the intercept factor is 0.139 and the variance of the slope factor is 0.003, both with p < .001. The covariance between the intercept and the slope is -0.015 (p < .001). Notice that the residual variances are freely estimated and differ across waves, from 0.047 at the fifth wave to 0.172 at the third wave. Figure 2.4 shows the Mplus results from the workshop, which agree with the R output.

Linear growth model path diagram with model fit statistics and estimates for means, variances and covariance
Figure 2.4: Results of the linear growth model, as shown in the workshop. The values come from Mplus and agree with the R output in this chapter. Source: workshop slides (Anyan, 2023).

2.4.6 Interpretation

The average score in 2015 is estimated to be 1.466, and the average change is -0.025 units per year. Over the six years from 2015 to 2021 this amounts to a decrease of about 0.15 units on average. The standard deviation of the intercept factor is 0.37, so the average decrease is about 0.40 of that standard deviation. The slope variance of 0.003 corresponds to a standard deviation of about 0.058. If the slopes are roughly normally distributed, about 95% of the participants would have yearly slopes between -0.14 and 0.09. That is to say, the average slope is negative, but the spread is consistent with a positive slope for some participants.

The correlation between the intercept and the slope is -0.71. Participants with a higher level in 2015 tend to have a more negative slope. Two cautions apply. First, the lowest observed score is 1 at every wave and most values are close to it, so a participant who starts near the bottom has little room to decline. A negative association between the starting level and the change could partly reflect this. Second, the slope variance is small in absolute terms, and the correlation is therefore estimated from a factor with little variance to work with.

We can also compare what the model implies with what we observe. The model-implied means are a straight line from 1.466 in 2015 down to 1.317 in 2021. The observed means of the 321 participants in the analysis go up from 1.443 at the first wave to 1.523 at the third wave and then fall to 1.307 at the fifth wave (see Figure 2.6 below). A straight line cannot reproduce a rise followed by a fall, and this is one reason to expect that the linear model fits poorly.

2.4.7 What changed compared with the previous model

Compared with the no growth model, we added three parameters: the mean of the slope, the variance of the slope and the covariance between the intercept and the slope. The degrees of freedom went from 13 to 10. The chi-square dropped from 186.433 to 75.244, the CFI rose from .607 to .852 and the RMSEA fell from .204 to .143. The mean of the intercept changed from 1.398 to 1.466 because it now refers to time 0 and not to the average across waves.

2.4.8 What this model answers and what it cannot tell

The linear model answers whether there is an average linear change and whether participants differ in it. The estimates suggest both. It cannot tell whether the change is really linear, because a model that fits poorly is not a good description of the shape. It also says nothing about why participants differ in their slopes. That is the task of the models with covariates in later chapters.

2.5 Model 3: the quadratic growth model

2.5.1 The idea in plain language

A third growth factor allows the rate of change to speed up or slow down. The quadratic factor is a curvature term. With a negative mean quadratic factor, the curve bends downward, which means that an upward trend flattens and turns, or a downward trend becomes steeper. The shape of the curve in the data comes from the combination of all three factors. Several other nonlinear shapes exist, and Grimm et al. (2011) give an overview of them in developmental research.

2.5.2 A concrete example

The observed wave means rise a little and then fall. This is the kind of pattern that a curved trajectory can describe. We therefore ask whether adding the quadratic factor improves the data to model correspondence enough to justify the extra parameters.

2.5.3 The formal model

\[ y_{ti} = \eta_{0i} + \lambda_t \, \eta_{1i} + \lambda_t^2 \, \eta_{2i} + \varepsilon_{ti}, \]

where the quadratic loadings are the squares of the slope loadings, that is 0, 1, 9, 16 and 36 (Bollen & Curran, 2006). The quadratic factor \(\eta_{2i}\) has a mean and a variance, and covariances with the intercept and with the slope. This adds four parameters to the linear model. Figure 2.5 shows the diagram. Notice that when a quadratic factor is in the model, the meaning of the slope factor changes. It is no longer the average rate of change over the whole period. It is the rate of change at time 0, that is in 2015.

Path diagram of the quadratic growth model with intercept, slope and quadratic factors and three covariances
Figure 2.5: The quadratic growth model as a path diagram. The intercept factor (I) has loadings of 1.0. The slope factor (S) has loadings of 0.0, 1.0, 3.0, 4.0 and 6.0. The quadratic factor (Q) has loadings of 0.0, 1.0, 9.0, 16.0 and 36.0. Three curved arrows connect the three growth factors. Source: workshop slides (Anyan, 2023).

2.5.4 R implementation

Code
quadratic <- ' i =~ 1*lone1 + 1*lone2 + 1*lone3 + 1*lone4 + 1*lone5
           s =~ 0*lone1 + 1*lone2 + 3*lone3 + 4*lone4 + 6*lone5
           q =~ 0*lone1 + 1*lone2 + 9*lone3 + 16*lone4 + 36*lone5'
fit_quadratic <- growth(quadratic, data = data)
summary(fit_quadratic, fit.measures = TRUE)
lavaan 0.6.17 ended normally after 79 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        14

                                                  Used       Total
  Number of observations                           321         442

Model Test User Model:
                                                      
  Test statistic                                46.671
  Degrees of freedom                                 6
  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                               451.170
  Degrees of freedom                                10
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.908
  Tucker-Lewis Index (TLI)                       0.846

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -744.754
  Loglikelihood unrestricted model (H1)       -721.418
                                                      
  Akaike (AIC)                                1517.507
  Bayesian (BIC)                              1570.308
  Sample-size adjusted Bayesian (SABIC)       1525.902

Root Mean Square Error of Approximation:

  RMSEA                                          0.145
  90 Percent confidence interval - lower         0.108
  90 Percent confidence interval - upper         0.185
  P-value H_0: RMSEA <= 0.050                    0.000
  P-value H_0: RMSEA >= 0.080                    0.998

Standardized Root Mean Square Residual:

  SRMR                                           0.074

Parameter Estimates:

  Standard errors                             Standard
  Information                                 Expected
  Information saturated (h1) model          Structured

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)
  i =~                                                
    lone1             1.000                           
    lone2             1.000                           
    lone3             1.000                           
    lone4             1.000                           
    lone5             1.000                           
  s =~                                                
    lone1             0.000                           
    lone2             1.000                           
    lone3             3.000                           
    lone4             4.000                           
    lone5             6.000                           
  q =~                                                
    lone1             0.000                           
    lone2             1.000                           
    lone3             9.000                           
    lone4            16.000                           
    lone5            36.000                           

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)
  i ~~                                                
    s                -0.020    0.009   -2.179    0.029
    q                 0.000    0.001    0.265    0.791
  s ~~                                                
    q                -0.002    0.001   -1.792    0.073

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 1.446    0.024   60.828    0.000
    s                 0.017    0.014    1.284    0.199
    q                -0.007    0.002   -3.384    0.001

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .lone1             0.037    0.014    2.584    0.010
   .lone2             0.118    0.012    9.942    0.000
   .lone3             0.144    0.014   10.115    0.000
   .lone4             0.099    0.011    8.672    0.000
   .lone5             0.099    0.027    3.684    0.000
    i                 0.148    0.019    7.974    0.000
    s                 0.018    0.007    2.697    0.007
    q                 0.000    0.000    0.959    0.337
A typing mistake on the workshop slide

The workshop slide with the results of the quadratic model reports an intercept of 1.466. The correct value is 1.446, as the lavaan output above shows. The value on the slide is a typing mistake. We do not show that slide here, and all numbers for the quadratic model in this chapter come from the R output.

2.5.5 The warning about the latent covariance matrix

Before reading any estimate, look at the warning that lavaan printed after the model was fitted. It says that the covariance matrix of latent variables is not positive definite. This warning means that the estimated variances and covariances of the three growth factors do not form a valid covariance matrix. A valid covariance matrix cannot produce negative variances or correlations larger than 1 in absolute value. We can check what happened with the estimated covariance matrix of the latent variables.

Code
# Addition, not part of the workshop: inspect the latent covariance matrix
lavInspect(fit_quadratic, "cov.lv")
       i      s      q
i  0.148              
s -0.020  0.018       
q  0.000 -0.002  0.000
Code
eigen(lavInspect(fit_quadratic, "cov.lv"))$values
[1]  1.509989e-01  1.500993e-02 -3.256461e-05
Code
cov2cor(lavInspect(fit_quadratic, "cov.lv"))
       i      s      q
i  1.000              
s -0.396  1.000       
q  0.067 -1.028  1.000

The smallest eigenvalue is slightly negative (about -0.00003). A positive definite matrix has only positive eigenvalues. The variance of the quadratic factor is 0.000 when rounded to three decimals. Its unrounded value is 0.000169 and its standard error is 0.000176 (z = 0.959, p = .337), so the variance is poorly determined. The implied correlation between the slope and the quadratic factor is -1.03, which is not possible for a correlation. The variance is positive, and the problem is the correlation above 1. The solution is therefore inadmissible.

A variance this small does not mean that the factor contributes little. The quadratic loading at the fifth wave is 36, so the variance adds 362 × 0.000169 = 0.22 to the variance of the fifth score. That contribution is offset by the negative covariance with the slope factor, which gives the implied correlation of -1.03. The data do not contain enough information to separate the two factors. The mean of the quadratic factor can still be estimated and describes the average curve. Since the model is flagged, the covariances involving the quadratic factor should not be interpreted, and we cannot conclude from these estimates that participants do not differ in their curvature.

A researcher can fix the variance of the quadratic factor to zero, together with its covariances. The factor then becomes a fixed effect: the average curve bends, and everyone is assumed to share the same curvature. Alternatively, the quadratic factor can be dropped and the linear model kept, or more information can be obtained, for example more participants or more waves. We try the first option below, as an addition to the workshop.

Code
# Addition, not part of the workshop: variance of q (and its covariances) fixed to zero
quadratic_fixed <- paste(quadratic, '
           q ~~ 0*q
           i ~~ 0*q
           s ~~ 0*q')
fit_quadratic_fixed <- growth(quadratic_fixed, data = data)
round(fitMeasures(fit_quadratic_fixed, c("chisq", "df", "cfi", "tli", "rmsea", "srmr", "aic", "bic")), 3)
   chisq       df      cfi      tli    rmsea     srmr      aic      bic 
  63.907    9.000    0.876    0.862    0.138    0.094 1528.744 1570.229 
Code
parameterEstimates(fit_quadratic_fixed) |>
  filter(op %in% c("~1", "~~"), lhs %in% c("i", "s", "q"), lhs == rhs | op == "~1") |>
  select(lhs, op, est, se, pvalue)
  lhs op    est    se pvalue
1   q ~~  0.000 0.000     NA
2   i ~~  0.140 0.015   0.00
3   s ~~  0.003 0.001   0.00
4   i ~1  1.447 0.024   0.00
5   s ~1  0.017 0.013   0.18
6   q ~1 -0.007 0.002   0.00
Code
an_fq <- anova(fit_quadratic_fixed, fit_quadratic)
an_fq

Chi-Squared Difference Test

                    Df    AIC    BIC  Chisq Chisq diff   RMSEA Df diff
fit_quadratic        6 1517.5 1570.3 46.671                           
fit_quadratic_fixed  9 1528.7 1570.2 63.907     17.236 0.12159       3
                    Pr(>Chisq)    
fit_quadratic                     
fit_quadratic_fixed  0.0006319 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

This model runs without the warning. It has 9 degrees of freedom, a chi-square of 63.907, CFI = .876 and RMSEA = .138. It fits better than the linear model but not as well as the quadratic model with the free variance. The chi-square difference with the full quadratic model is 17.236 on 3 degrees of freedom (p < .001). Fixing the variance to zero worsens the fit. Because the test is at a boundary, the p-value is approximate (Self & Liang, 1987). The BIC of the two models is almost identical (1570.2 and 1570.3). The mean of the quadratic factor is -0.007 in the fixed version, the same value as in the free version.

2.5.6 Understanding the output

The chi-square of the quadratic model is 46.671 on 6 degrees of freedom (p < .001), the CFI is .908, the TLI is .846, the RMSEA is .145 (90% CI .108 to .185) and the SRMR is .074. The model has 14 free parameters and uses 321 participants. Compared with the linear model, the CFI and the SRMR are better, the TLI is slightly worse, and the RMSEA is essentially the same. None of the indices reaches the usual guidelines for good fit.

The growth factor means are 1.446 for the intercept (SE = 0.024), 0.017 for the slope (SE = 0.014, p = .199) and -0.007 for the quadratic factor (SE = 0.002, p = .001). The intercept variance is 0.148, the slope variance is 0.018 (p = .007) and the quadratic variance is 0.000 (p = .337). The covariance between the intercept and the slope is -0.020 (p = .029). The covariance between the intercept and the quadratic factor is 0.000 (p = .791) and between the slope and the quadratic factor it is -0.002 (p = .073). The last two covariances are attached to the quadratic variance, and for the reasons given above we do not interpret them.

2.5.7 Interpretation

The mean of the quadratic factor is negative and clearly different from zero, which suggests that the average curve bends downward. The mean of the slope is now small and not different from zero. This does not contradict the linear model, in which the slope was -0.025. The two slopes answer different questions. In the linear model the slope is the average rate of change over the period. In the quadratic model it is the rate of change at 2015, and the later rate depends on the curvature. If we take the estimated means at face value, the model-implied average score rises very slightly from 1.446 in 2015 to 1.456 in 2016, reaches its maximum about 1.22 years after 2015, and then falls to 1.292 in 2021. The fall from 2016 to 2021 is 0.164 units, which is about 0.43 of the standard deviation of the intercept factor (0.38). Since the mean of the slope is not distinguishable from zero, we should not make much of the exact turning point.

Thus, the slope variance means something different in each model. It is 0.018 in the quadratic model and 0.003 in the linear model. In the quadratic model it describes how much participants differ in their rate of change at time 0. It is tied to the quadratic factor: with the quadratic variance and its covariances fixed to zero, the slope variance is 0.003. It is therefore not comparable with the slope variance from the linear model.

Figure 2.6 shows the observed means of the participants in the analysis next to the model-implied means of the three models.

Code
means_tab <- data.frame(
  time = c(0, 1, 3, 4, 6),
  Observed = colMeans(data[complete.cases(data[, lone]), lone]),
  `No growth` = as.numeric(fitted(fit_nogrowth)$mean),
  Linear = as.numeric(fitted(fit_linear)$mean),
  Quadratic = as.numeric(fitted(fit_quadratic)$mean),
  check.names = FALSE
)
means_long <- pivot_longer(means_tab, -c(time, Observed), names_to = "Model", values_to = "Mean")
ggplot(means_long, aes(time, Mean, linetype = Model)) +
  geom_line(linewidth = 0.8, color = "black") +
  geom_point(aes(y = Observed), size = 2.5, color = "black") +
  scale_x_continuous(breaks = c(0, 1, 3, 4, 6)) +
  labs(x = "Years since 2015", y = "Mean score")
Line chart of the observed mean loneliness score at the five waves with three model-implied mean curves
Figure 2.6: Observed wave means of the 321 participants in the analysis (points) and the model-implied means of the no growth, linear and quadratic models (lines). The horizontal axis is time in years since 2015.
Code
knitr::kable(round(means_tab, 3), row.names = FALSE, caption = "Observed and model-implied means at the five waves.")
Observed and model-implied means at the five waves.
time Observed No growth Linear Quadratic
0 1.443 1.398 1.466 1.446
1 1.455 1.398 1.441 1.456
3 1.523 1.398 1.391 1.434
4 1.333 1.398 1.367 1.401
6 1.307 1.398 1.317 1.292

The quadratic curve is closer to the observed means than the straight line at the first three waves, but the straight line is closer at the fourth and fifth waves. At the fourth wave the quadratic curve misses by 0.068 and the straight line by 0.034. Both curves underestimate the third wave: the observed mean there is 1.523, the quadratic model implies 1.434 and the linear model implies 1.391. A quadratic curve can bend only once, and the observed means seem to go up, then down, and the drop between the third and the fourth wave is sharper than a smooth curve of this kind allows. This helps to explain why the fit remains poor.

2.5.8 What changed compared with the previous model

Compared with the linear model, we added the quadratic factor with its mean, its variance and two covariances. The degrees of freedom went from 10 to 6. The chi-square went from 75.244 to 46.671, the CFI from .852 to .908 and the SRMR from .097 to .074. The slope mean changed sign and is no longer different from zero, and the slope variance rose from 0.003 to 0.018, because the slope now refers to the rate of change at time 0. The model also produced the warning discussed above, which the linear model did not.

2.5.9 What this model answers and what it cannot tell

The quadratic model asks whether the average trajectory is curved. The estimate suggests that it is, with a negative curvature. It cannot tell whether participants differ in their curvature, because the variance of the quadratic factor is not reliably estimated. It also cannot say that a quadratic curve is the right shape. The fit remains poor and the third wave is still not reproduced.

2.6 Comparing the models

The three models are nested. The no growth model is the linear model with the slope mean, the slope variance and the covariance fixed to zero. The linear model is the quadratic model with the quadratic mean, variance and the two covariances fixed to zero. A nested pair can be compared with a chi-square difference test (Bentler & Bonett, 1980). The reduced model has fewer free parameters and the more complex model has more. If the more complex model fits significantly better, the reduced model is rejected. The AIC (Akaike, 1974) and the BIC (Schwarz, 1978) also compare the models. Both penalize the number of parameters, and lower values are preferred.

In lavaan the comparison is done with anova(). The output lists the models with the more constrained one last.

Code
an_nl <- anova(fit_nogrowth, fit_linear)
an_lq <- anova(fit_linear, fit_quadratic)
an_nl

Chi-Squared Difference Test

             Df    AIC    BIC   Chisq Chisq diff   RMSEA Df diff Pr(>Chisq)    
fit_linear   10 1538.1 1575.8  75.244                                          
fit_nogrowth 13 1643.3 1669.7 186.433     111.19 0.33518       3  < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
an_lq

Chi-Squared Difference Test

              Df    AIC    BIC  Chisq Chisq diff   RMSEA Df diff Pr(>Chisq)    
fit_quadratic  6 1517.5 1570.3 46.671                                          
fit_linear    10 1538.1 1575.8 75.244     28.573 0.13834       4  9.546e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The first test compares the no growth model with the linear model. The chi-square difference is 111.19 on 3 degrees of freedom, with p < .001. In words, the no growth model is rejected, so the linear model fits better. The difference of 3 degrees of freedom is the three parameters added by the slope factor. The AIC is lower for the linear model (1538.1 against 1643.3) and so is the BIC (1575.8 against 1669.7).

The second test compares the linear model with the quadratic model. The chi-square difference is 28.573 on 4 degrees of freedom, with p < .001. The linear model is rejected, so the quadratic model fits better. The AIC is lower for the quadratic model (1517.5 against 1538.1) and so is the BIC (1570.3 against 1575.8), although the difference in BIC is small.

Both tests set a variance to zero in the reduced model, the slope variance in the first and the quadratic variance in the second. A variance of zero lies on the boundary of the parameter space, so the reference distribution of the chi-square difference is not an exact chi-square distribution and the p-values are only approximate (Self & Liang, 1987). The scores are also skewed (Chapter 1), so the standard ML chi-square is itself uncertain. For robust estimators a scaled difference test has to be used (Satorra & Bentler, 2001), and the comparisons above use the standard ML chi-square.

Compare models that fit, and read the comparison with the fit

A chi-square difference test only compares two models with each other. When both models fit poorly, a significant difference means that one is less bad than the other. The CFI of the quadratic model is .908 and the RMSEA is .145. Only models with acceptable fit should be compared for substantive conclusions. Always report the fit of each model next to the comparison, and avoid substantive conclusions about the shape of change until a model with acceptable fit is found.

Fit of the three models (321 participants).
npar chisq df cfi tli rmsea srmr aic bic
No growth 7 186.433 13 0.607 0.698 0.204 0.172 1643.269 1669.669
Linear 10 75.244 10 0.852 0.852 0.143 0.097 1538.080 1575.795
Quadratic 14 46.671 6 0.908 0.846 0.145 0.074 1517.507 1570.308

2.7 Sensitivity to the missing data handling

This section is an addition to the workshop. The models above use listwise deletion, so 121 of the 442 rows are not used. Chapter 1 explains listwise deletion and full information maximum likelihood (FIML) and runs this check for the linear model. Here we refit the linear model with FIML, which uses all the available scores of each participant.

Code
# Addition, not part of the workshop: same linear model, FIML instead of listwise deletion
fit_linear_fiml <- growth(linear, data = data, missing = "fiml")
lavInspect(fit_linear_fiml, "ntotal")
[1] 436
Code
compare <- data.frame(
  Parameter = c("Intercept mean", "Slope mean", "Intercept variance", "Slope variance", "Intercept-slope covariance"),
  Listwise = c(coef(fit_linear)[c("i~1", "s~1", "i~~i", "s~~s", "i~~s")]),
  FIML = c(coef(fit_linear_fiml)[c("i~1", "s~1", "i~~i", "s~~s", "i~~s")])
)
knitr::kable(compare, digits = 3, row.names = FALSE)
Parameter Listwise FIML
Intercept mean 1.466 1.490
Slope mean -0.025 -0.027
Intercept variance 0.139 0.165
Slope variance 0.003 0.004
Intercept-slope covariance -0.015 -0.016

FIML uses 436 participants. The other six rows have no loneliness score at any of the five waves, and lavaan leaves them out. The estimates of the growth factor means change little: the intercept is 1.490 under FIML and 1.466 under listwise deletion, and the slope is -0.027 under FIML and -0.025 under listwise deletion. The variances are somewhat larger under FIML. The conclusions about the direction of the average change and the presence of between-person differences stay the same. The fit statistics of the two runs are not comparable because the numbers of participants differ.

2.8 Researcher’s perspective

The time scores 0, 1, 3, 4 and 6 follow the real spacing of the waves. Equal spacing, such as 0, 1, 2, 3, 4, would give a different slope estimate, -0.037 per step against -0.025 per year, but essentially the same fit (chi-square 75.355 against 75.244, CFI .852 in both). The fit therefore does not show whether the time scores are right, and they have to be chosen from the spacing of the waves.

Models are compared by starting with the reduced model, adding one feature at a time, and using the chi-square difference test together with AIC and BIC. The fit of each model by itself is then examined. In our case no model reaches acceptable fit, and the comparisons are therefore best described as showing that the data favor more flexibility in the mean trajectory than a flat line or a straight line. They do not show that the quadratic model is correct.

A warning about a covariance matrix that is not positive definite is information about the model and the data. Report it, check the latent covariance matrix, and say which choice you made afterwards: keep the model and refrain from interpreting the affected parameters, fix the variance to zero, or drop the factor. Do not change the model until the warning disappears and then report only the final version.

State the number of participants used and the way missing data were handled, and report a check with FIML when listwise deletion removes many rows.

In the next chapter we keep the same data and ask whether a model with two linear pieces fits the loneliness scores better than one smooth curve, since the observed means appear to rise and then fall (see Chapter 3).