38.1 L’effetto delle covariate

Un modello leggermente più complesso aggiunge due regressori (x1 e x2) che influenzano i fattori di crescita latenti. Inoltre, è stata aggiunta al modello una covariata c variabile nel tempo che influenza la misura del risultato (la variabile dipendente) nei quattro punti temporali.

model2 <- "
  # intercept and slope with fixed coefficients
    i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
    s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4
  # regressions
    i ~ x1 + x2
    s ~ x1 + x2
  # time-varying covariates
    t1 ~ c1
    t2 ~ c2
    t3 ~ c3
    t4 ~ c4
"
fit2 <- growth(model2, data = Demo.growth)
summary(fit2)
#> lavaan 0.6.15 ended normally after 31 iterations
#> 
#>   Estimator                                         ML
#>   Optimization method                           NLMINB
#>   Number of model parameters                        17
#> 
#>   Number of observations                           400
#> 
#> Model Test User Model:
#>                                                       
#>   Test statistic                                26.059
#>   Degrees of freedom                                21
#>   P-value (Chi-square)                           0.204
#> 
#> Parameter Estimates:
#> 
#>   Standard errors                             Standard
#>   Information                                 Expected
#>   Information saturated (h1) model          Structured
#> 
#> Latent Variables:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   i =~                                                
#>     t1                1.000                           
#>     t2                1.000                           
#>     t3                1.000                           
#>     t4                1.000                           
#>   s =~                                                
#>     t1                0.000                           
#>     t2                1.000                           
#>     t3                2.000                           
#>     t4                3.000                           
#> 
#> Regressions:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   i ~                                                 
#>     x1                0.608    0.060   10.134    0.000
#>     x2                0.604    0.064    9.412    0.000
#>   s ~                                                 
#>     x1                0.262    0.029    9.198    0.000
#>     x2                0.522    0.031   17.083    0.000
#>   t1 ~                                                
#>     c1                0.143    0.050    2.883    0.004
#>   t2 ~                                                
#>     c2                0.289    0.046    6.295    0.000
#>   t3 ~                                                
#>     c3                0.328    0.044    7.361    0.000
#>   t4 ~                                                
#>     c4                0.330    0.058    5.655    0.000
#> 
#> Covariances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>  .i ~~                                                
#>    .s                 0.075    0.040    1.855    0.064
#> 
#> Intercepts:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>    .t1                0.000                           
#>    .t2                0.000                           
#>    .t3                0.000                           
#>    .t4                0.000                           
#>    .i                 0.580    0.062    9.368    0.000
#>    .s                 0.958    0.029   32.552    0.000
#> 
#> Variances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>    .t1                0.580    0.080    7.230    0.000
#>    .t2                0.596    0.054   10.969    0.000
#>    .t3                0.481    0.055    8.745    0.000
#>    .t4                0.535    0.098    5.466    0.000
#>    .i                 1.079    0.112    9.609    0.000
#>    .s                 0.224    0.027    8.429    0.000
kable(coef(fit2), booktabs = TRUE, format = "markdown")
x
i~x1 0.60838657
i~x2 0.60410683
s~x1 0.26223932
s~x2 0.52173009
t1~c1 0.14335610
t2~c2 0.28900400
t3~c3 0.32753750
t4~c4 0.33049483
t1~~t1 0.57982241
t2~~t2 0.59559342
t3~~t3 0.48141221
t4~~t4 0.53520654
i~~i 1.07945768
s~~s 0.22376291
i~~s 0.07475324
i~1 0.58023837
s~1 0.95757971

I risultati mostrano che le due covariate \(x\) influenzano sia l’intercetta sia la pendenza della curva di crescita. Inoltre, vi sono evidenze di un effetto della covariata c.