HW2

Author

Qipeng Chen

1.R input and output for model

library(lavaan)
This is lavaan 0.6-21
lavaan is FREE software! Please report any bugs.
# 1. Data Setup
lower <- '
1.00
0.57 1.00
0.25 0.64 1.00
0.33 0.23 0.15 1.00
0.29 0.37 0.25 0.38 1.00
0.19 0.20 0.27 0.26 0.38 1.00
0.47 0.37 0.28 0.22 0.23 0.13 1.00
0.44 0.58 0.43 0.21 0.37 0.20 0.59 1.00
0.30 0.40 0.52 0.12 0.20 0.31 0.40 0.60 1.00'

# Variables: FC=fclim, AS=assert, PE=poseng
vars <- c("FC1", "FC2", "FC3", 
          "AS1", "AS2", "AS3", 
          "PE1", "PE2", "PE3")

# Create covariance matrix
hw2.cor <- getCov(lower, names = vars)
hw2.mns <- c(3.59, 3.51, 3.35, 4.24, 4.23, 4.28, 4.27, 3.89, 3.47)
hw2.sds <- c(0.74, 0.80, 0.76, 0.63, 0.68, 0.67, 0.91, 1.11, 1.17)
hw2.cov <- lav_cor2cov(hw2.cor, sds = hw2.sds)
N <- 974

# 2. Model Definition (CLPM)
clpm.model <- '
  # Regressions T1 -> T2 (Autoregressive & Cross-lagged)
  FC2 ~ a1*FC1 + AS1 + PE1
  AS2 ~ FC1 + b1*AS1 + PE1
  PE2 ~ FC1 + AS1 + c1*PE1

  # Regressions T2 -> T3
  FC3 ~ a2*FC2 + AS2 + PE2
  AS3 ~ FC2 + b2*AS2 + PE2
  PE3 ~ FC2 + AS2 + c2*PE2

  # Covariances 
  FC1 ~~ AS1 + PE1; AS1 ~~ PE1
  FC2 ~~ AS2 + PE2; AS2 ~~ PE2
  FC3 ~~ AS3 + PE3; AS3 ~~ PE3

  # Indirect Effects (T1->T2->T3)
  ind_FC := a1*a2
  ind_AS := b1*b2
  ind_PE := c1*c2
'

# 3. Fit Model
fit <- sem(clpm.model, 
           sample.cov = hw2.cov, 
           sample.nobs = N, 
           sample.mean = hw2.mns)

# 4. Results
summary(fit, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)
lavaan 0.6-21 ended normally after 55 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        45

  Number of observations                           974

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

Model Test Baseline Model:

  Test statistic                              3168.372
  Degrees of freedom                                36
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.976
  Tucker-Lewis Index (TLI)                       0.904

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -9060.710
  Loglikelihood unrestricted model (H1)      -9018.794
                                                      
  Akaike (AIC)                               18211.420
  Bayesian (BIC)                             18431.083
  Sample-size adjusted Bayesian (SABIC)      18288.163

Root Mean Square Error of Approximation:

  RMSEA                                          0.092
  90 Percent confidence interval - lower         0.075
  90 Percent confidence interval - upper         0.111
  P-value H_0: RMSEA <= 0.050                    0.000
  P-value H_0: RMSEA >= 0.080                    0.882

Standardized Root Mean Square Residual:

  SRMR                                           0.024

Parameter Estimates:

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

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  FC2 ~                                                                 
    FC1       (a1)    0.538    0.033   16.267    0.000    0.538    0.497
    AS1               0.048    0.035    1.363    0.173    0.048    0.038
    PE1               0.112    0.026    4.322    0.000    0.112    0.128
  AS2 ~                                                                 
    FC1               0.131    0.031    4.192    0.000    0.131    0.143
    AS1       (b1)    0.337    0.033   10.136    0.000    0.337    0.312
    PE1               0.070    0.025    2.862    0.004    0.070    0.094
  PE2 ~                                                                 
    FC1               0.297    0.044    6.702    0.000    0.297    0.198
    AS1               0.065    0.047    1.388    0.165    0.065    0.037
    PE1       (c1)    0.596    0.035   17.093    0.000    0.596    0.489
  FC3 ~                                                                 
    FC2       (a2)    0.559    0.029   19.150    0.000    0.559    0.589
    AS2              -0.001    0.030   -0.026    0.980   -0.001   -0.001
    PE2               0.061    0.021    2.887    0.004    0.061    0.089
  AS3 ~                                                                 
    FC2               0.038    0.031    1.227    0.220    0.038    0.045
    AS2       (b2)    0.341    0.032   10.659    0.000    0.341    0.346
    PE2               0.027    0.022    1.227    0.220    0.027    0.045
  PE3 ~                                                                 
    FC2               0.129    0.047    2.750    0.006    0.129    0.088
    AS2              -0.071    0.048   -1.473    0.141   -0.071   -0.041
    PE2       (c2)    0.595    0.034   17.624    0.000    0.595    0.564

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  FC1 ~~                                                                
    AS1               0.154    0.016    9.780    0.000    0.154    0.330
    PE1               0.316    0.024   13.275    0.000    0.316    0.470
  AS1 ~~                                                                
    PE1               0.126    0.019    6.706    0.000    0.126    0.220
 .FC2 ~~                                                                
   .AS2               0.099    0.013    7.500    0.000    0.099    0.248
   .PE2               0.246    0.020   12.454    0.000    0.246    0.435
 .AS2 ~~                                                                
   .PE2               0.140    0.018    7.907    0.000    0.140    0.262
 .FC3 ~~                                                                
   .AS3               0.069    0.012    5.856    0.000    0.069    0.191
   .PE3               0.206    0.019   11.078    0.000    0.206    0.380
 .AS3 ~~                                                                
   .PE3               0.153    0.019    8.018    0.000    0.153    0.266

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .FC2               0.896    0.161    5.581    0.000    0.896    1.121
   .AS2               2.030    0.152   13.360    0.000    2.030    2.987
   .PE2               0.001    0.215    0.003    0.998    0.001    0.001
   .FC3               1.154    0.125    9.256    0.000    1.154    1.519
   .AS3               2.596    0.132   19.602    0.000    2.596    3.877
   .PE3               1.005    0.200    5.032    0.000    1.005    0.860
    FC1               3.590    0.024  151.484    0.000    3.590    4.854
    AS1               4.240    0.020  210.149    0.000    4.240    6.734
    PE1               4.270    0.029  146.517    0.000    4.270    4.695

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .FC2               0.422    0.019   22.068    0.000    0.422    0.660
   .AS2               0.378    0.017   22.068    0.000    0.378    0.818
   .PE2               0.759    0.034   22.068    0.000    0.759    0.617
   .FC3               0.338    0.015   22.068    0.000    0.338    0.585
   .AS3               0.381    0.017   22.068    0.000    0.381    0.850
   .PE3               0.868    0.039   22.068    0.000    0.868    0.635
    FC1               0.547    0.025   22.068    0.000    0.547    1.000
    AS1               0.396    0.018   22.068    0.000    0.396    1.000
    PE1               0.827    0.037   22.068    0.000    0.827    1.000

R-Square:
                   Estimate
    FC2               0.340
    AS2               0.182
    PE2               0.383
    FC3               0.415
    AS3               0.150
    PE3               0.365

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    ind_FC            0.301    0.024   12.398    0.000    0.301    0.293
    ind_AS            0.115    0.016    7.345    0.000    0.115    0.108
    ind_PE            0.355    0.029   12.270    0.000    0.355    0.276
modindices(fit, sort.=TRUE, minimum.value=10)
    lhs op rhs     mi    epc sepc.lv sepc.all sepc.nox
49  FC2 ~~ FC3 57.281  0.178   0.178    0.471    0.471
67  FC3 ~~ FC1 54.305 -0.088  -0.088   -0.205   -0.205
93  FC3  ~ FC1 52.833 -0.208  -0.208   -0.203   -0.203
109 FC1  ~ FC3 46.141 -0.262  -0.262   -0.269   -0.269
78  FC2  ~ FC3 45.286  0.509   0.509    0.484    0.484
56  AS2 ~~ AS3 18.535 -0.152  -0.152   -0.399   -0.399
99  AS3  ~ AS1 17.712  0.138   0.138    0.130    0.130
84  AS2  ~ AS3 16.099 -0.386  -0.386   -0.381   -0.381
71  AS3 ~~ AS1 13.696  0.044   0.044    0.112    0.112
118 AS1  ~ AS3 12.929  0.116   0.116    0.124    0.124
125 PE1  ~ FC3 11.835  0.171   0.171    0.143    0.143

2.Graphical representation of model

Figure 1: Graphical representation of model

3.Summary information of models in text

A cross-lagged panel model was tested to investigate the longitudinal associations of family climate (FC), assertiveness (AS), and positive engagement (PE). Model fit was acceptable, \(\chi^2\) (9) = 83.832, p < .001, CFI = .976, TLI = .904, RMSEA = .092 (90% CI .075, .111), SRMR = .024.

As seen in the Figure 1, FC, AS, and PE were all stable over time. The autoregressive paths were significant from T1 to T2 (FC \(\beta = .497\), AS \(\beta = .312\), PE \(\beta = .489\); all \(p < .001\)) and from T2 to T3 (FC \(\beta = .589\), AS \(\beta = .346\), PE \(\beta = .564\); all \(p < .001\)). FC was positively correlated with PE at T1 (\(\phi = .470\), SE \(= .024, p < .001\)). Additionally, FC at T1 positively predicted PE at T2 (\(\beta = .198\), SE \(= .044, p < .001\)) and PE at T1 predicted FC at T2 (\(\beta = .128\), SE \(= .026, p < .001\)). Similarly, from T2 to T3, FC and PE were reciprocally related, with T2 FC predicting T3 PE (\(\beta = .088, SE = .047, p = .006\)) and T2 PE predicting T3 FC (\(\beta = .089, SE = .021, p = .004\))

The indirect effect of T1 FC on FC at T3 via FC at T2 was significant, IE \(= .301\), SE \(= .024, p < .001\). The indirect effect of T1 AS on AS at T3 via AS at T2 was significant, IE \(= .115\), SE \(= .016, p < .001\). The indirect effect of T1 PE on PE at T3 via PE at T2 was significant, IE \(= .355\), SE \(= .029, p < .001\).

The model predicted 34.0% of the variance in T2 FC, 41.5% of the variance in T3 FC, 18.2% of the variance in T2 AS, 15.0% of the variance in T3 AS, 38.3% of the variance in T2 PE, and 36.5% of the variance in T3 PE.