Preliminary analysis of Expolect project in Mainland France (2022-2023)

Author

B. Brossette

Librairies Loading
#clean the environment
rm(list = ls())

#Libraries
library(readr)
library(stringr)
library(plyr)
library(dplyr)
library(tidyverse)
library(lme4)
library(car)
library(emmeans)
library(ggthemes)
library(data.table)
library(corrplot)
library(Hmisc)
library(lavaan)
library(lavaanPlot)
library(semPlot)
library(effectsize)

1 Data Loading

Data loading
#main dataset
df <- read_delim("../src/expolect_S.csv", 
    delim = ";", escape_double = FALSE, trim_ws = TRUE)

#variable type----
df$subject <- as.factor(df$subject)
df$grade <- as.factor(df$grade)
df$sex <- as.factor(df$sex)
df$laterality <- as.factor(df$laterality)
df$DEM_VT <- as.numeric(df$DEM_VT)
df$DEM_dsVT <- as.numeric(df$DEM_dsVT)
df$DEM_HT <- as.numeric(df$DEM_HT)
df$DEM_dsHT <- as.numeric(df$DEM_dsHT)
df$DEM_dsHE <- as.numeric(df$DEM_dsHE)

#scale reading time
df$s_LPAR_P_time <- scale(df$LPAR_P_time)
df$s_LPLA_P_time <- scale(df$LPLA_P_time)
df$s_LDEM_P_time <- scale(df$LDEM_P_time)

#print preview table
knitr::kable(head(df),digits=2,format = "html")
EXCL_CRITERIA EXCL_PAR subject grade cycle age sex laterality DEM_VT DEM_dsVT DEM_HT DEM_dsHT DEM_HE DEM_dsHE AL_age AL_CM AL_dsCM AL_CTL AL_dsCTL PA_SUP PA_dsSUP mum_diploma LPAR_P_freq LPAR_P_time LPLA_P_freq LPLA_P_time LDEM_P_freq LDEM_P_time Book_nb_P s_LPAR_P_time s_LPLA_P_time s_LDEM_P_time
0 0 1 1 2 76 M D 58.56 -0.65 73.85 -1.12 25 1.22 87 86.05 0.12 111 1.24 12 0.86 3 3 30 5 120 5 240 15 -0.4706694 -0.2216449 2.02510766
0 0 2 1 2 78 F D 69.58 -0.13 124.75 0.55 22 0.86 78 66.67 -2.04 26 -1.26 8 -0.46 7 5 420 5 180 1 0 100 4.3142466 0.1359304 -0.72528072
0 0 3 1 2 77 F D 147.00 3.56 228.72 3.96 11 -0.47 78 77.78 -0.80 21 -1.41 11 0.53 4 3 60 5 210 4 60 45 -0.1025990 0.3147181 -0.03768362
0 0 4 1 2 83 F D 76.51 0.20 179.59 2.34 35 2.42 <78 62.96 -2.45 17 -1.53 5 -1.45 2 4 60 5 60 4 20 NA -0.1025990 -0.5792202 -0.49608169
0 0 5 1 2 86 M D 58.78 0.59 98.46 1.21 17 1.20 86 80.88 -0.46 110 1.21 12 0.86 7 5 150 5 120 4 60 100 1.0016124 -0.2216449 -0.03768362
0 0 6 1 2 80 M D 47.91 -1.16 134.49 0.86 11 -0.47 78 73.17 -1.31 30 -1.15 7 -0.79 3 5 30 3 60 5 60 30 -0.4706694 -0.5792202 -0.03768362
Data loading
#select dataframe from our analysis
df.1 <- df %>% filter(EXCL_PAR==0)

The dataset contains the following variables :

  • EXCL_CRIT (binary): specify participants who must be excluded based on the following specific exclusion criteria : […]. Based on this criteria 0 participants must be excluded.

  • EXCL_PAR (binary): […]

  • subject (factor: 001-359): […]

  • grade (factor: 1-5): […]

  • cycle (factor: 2-3): […]

  • age (numeric): […]

  • sex (factor : M/F): […]

  • laterality (factor: D/G): […]

  • DEM_VT (numeric): […]

  • DEM_dsVT (numeric): […]

  • DEM_HT (numeric): […]

  • DEM_dsHT (numeric): […]

  • DEM_HE (numeric): […]

  • DEM_dsHE (numeric): […]

  • AL_age (numeric): […]

  • AL_CM (numeric): […]

  • AL_dsCM (numeric): […]

  • AL_CTL (numeric): […]

  • AL_dsCTL (numeric): […]

  • PA_SUP (numeric): […]

  • PA_dsSUP (numeric): […]

  • mum_diploma (factor: 1-8): […]

  • LPAR_P_freq (discrete: 1-5): […]

  • LPAR_P_time (numeric): […]

  • LPLA_P_freq (discrete: 1-5): […]

  • LPLA_P_time (numeric): […]

  • LDEM_P_freq (discrete: 1-5): […]

  • LDEM_P_time (numeric): […]

  • Book_nb_P (numeric): […]

2 Sample characteristics

[…]

Code
sum.by.grade <- df.1 %>% 
          group_by(grade) %>% 
          summarise(nb = n(), 
              m.VT = mean(DEM_VT), m.HT = mean(DEM_HT), mean.HE = mean(DEM_HE),
              m.ctl = mean(AL_CTL), m.cm = mean(AL_CM),
              m.LPAR = mean(LPAR_P_time), m.LPLA= mean(LPLA_P_time),
              m.LDEM = mean(LDEM_P_time))

knitr::kable(sum.by.grade,digits=2,format = "html")
grade nb m.VT m.HT mean.HE m.ctl m.cm m.LPAR m.LPLA m.LDEM
1 34 64.89 131.93 20.12 80.68 82.31 103.24 115.44 74.32
2 38 52.67 85.97 9.37 167.30 89.01 102.11 129.87 44.95
3 30 46.41 66.13 6.13 224.66 95.04 54.67 147.63 56.17
4 27 42.41 58.92 3.67 283.11 95.84 52.59 188.33 62.78
5 70 41.14 52.15 2.71 299.59 95.60 49.21 179.79 66.64
Code
sum.by.cycle <- df.1 %>% 
          group_by(cycle) %>% 
          summarise(nb = n(), 
              m.VT = mean(DEM_VT), m.HT = mean(DEM_HT), mean.HE = mean(DEM_HE),
              m.ctl = mean(AL_CTL), m.cm = mean(AL_CM),
              m.LPAR = mean(LPAR_P_time), m.LPLA= mean(LPLA_P_time),
              m.LDEM = mean(LDEM_P_time))

knitr::kable(sum.by.cycle,digits=2,format = "html")
cycle nb m.VT m.HT mean.HE m.ctl m.cm m.LPAR m.LPLA m.LDEM
2 102 54.9 95.46 12.00 155.3 88.55 88.53 130.28 58.04
3 97 41.5 54.03 2.98 295.0 95.67 50.15 182.16 65.57

3 Correlation matrices

Code
#sub-dataframe
df.corW <- df.1 %>% select(DEM_dsHT, DEM_dsVT, AL_dsCM, AL_dsCTL, PA_dsSUP, mum_diploma,
                            LPAR_P_time, LPLA_P_time, LDEM_P_time)

#correlation matrices
mat.parW <- rcorr(as.matrix(df.corW))$r
pmat.parW <- rcorr(as.matrix(df.corW))$p

#plot
corrplot(mat.parW, method="color", type="lower", 
          p.mat=pmat.parW,sig.level = 0.01, insig = "blank", 
          addCoef.col ='black', number.cex = 0.5)

Code
#sub-dataframe
df.corC2 <- df.1 %>% filter(cycle==2) %>% 
  select(DEM_dsHT, DEM_dsVT, AL_dsCM, AL_dsCTL, PA_dsSUP, mum_diploma,
                            LPAR_P_time, LPLA_P_time, LDEM_P_time) 
df.corC3 <- df.1 %>% filter(cycle==3) %>% 
  select(DEM_dsHT, DEM_dsVT, AL_dsCM, AL_dsCTL, PA_dsSUP, mum_diploma,
                            LPAR_P_time, LPLA_P_time, LDEM_P_time) 

#correlation matrices 
mat.parC2 <- rcorr(as.matrix(df.corC2))$r
pmat.parC2 <- rcorr(as.matrix(df.corC2))$p

mat.parC3 <- rcorr(as.matrix(df.corC3))$r
pmat.parC3 <- rcorr(as.matrix(df.corC3))$p

#plot
corrplot(mat.parC2, method="color", type="lower", 
          p.mat=pmat.parC2,sig.level = 0.01, insig = "blank", 
          addCoef.col ='black', number.cex = 0.5)
corrplot(mat.parC3, method="color", type="lower", 
          p.mat=pmat.parC2,sig.level = 0.01, insig = "blank", 
          addCoef.col ='black', number.cex = 0.5)

(a) Cycle 2

(b) Cycle 3

Figure 1: Correlation matrices by school cycle

4 Path analysis

4.1 On the whole dataset

[…] Explain the procedure […]

4.2 Outcome measure: CTL

Code
m.DEM.UD <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.fit <- sem(m.DEM.UD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                               127.985
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.998
  Tucker-Lewis Index (TLI)                       0.990

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -636.527
  Loglikelihood unrestricted model (H1)       -635.907
                                                      
  Akaike (AIC)                                1285.053
  Bayesian (BIC)                              1304.813
  Sample-size adjusted Bayesian (SABIC)       1285.805

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.333    0.082    4.077    0.000
    PA_dsSUP   (d)    0.220    0.072    3.030    0.002
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.360    0.096   -3.751    0.000
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.400    0.030  -13.237    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.880    0.084   10.442    0.000
   .DEM_dsHT          2.339    0.309    7.572    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.435
    DEM_dsHT          0.052

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.144    0.041    3.530    0.000
    total             0.696    0.120    5.817    0.000
Code
lavaanPlot(model = m.DEM.UD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99401237      0.95   satisfactory
2   AGFI 0.94012374      0.90   satisfactory
3    NFI 0.99031921      0.90   satisfactory
4   NNFI 0.99028356      0.90   satisfactory
5    CFI 0.99805671      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02728922      0.08   satisfactory
8    RFI 0.95159606      0.90   satisfactory
9   PNFI 0.19806384      0.50           poor
10   IFI 0.99811793      0.90   satisfactory
Code
m.DEM.BD <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.fit <- sem(m.DEM.BD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 12 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 5.166
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.076

Model Test Baseline Model:

  Test statistic                               134.305
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.975
  Tucker-Lewis Index (TLI)                       0.926

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -916.264
  Loglikelihood unrestricted model (H1)       -913.681
                                                      
  Akaike (AIC)                                1846.527
  Bayesian (BIC)                              1869.581
  Sample-size adjusted Bayesian (SABIC)       1847.404

Root Mean Square Error of Approximation:

  RMSEA                                          0.089
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.188
  P-value H_0: RMSEA <= 0.050                    0.178
  P-value H_0: RMSEA >= 0.080                    0.656

Standardized Root Mean Square Residual:

  SRMR                                           0.061

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.173    0.034    5.094    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.173    0.034    5.094    0.000
  AL_dsCTL ~                                          
    PA_dsSUP   (d)    0.247    0.073    3.373    0.001
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.183    0.100   -1.828    0.068
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.409    0.032  -12.685    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.903    0.088   10.284    0.000
   .s_LPLA_P_time     0.858    0.165    5.193    0.000
   .DEM_dsHT          2.370    0.320    7.396    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.412
    s_LPLA_P_time     0.125
    DEM_dsHT          0.039

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.075    0.041    1.815    0.070
    total             0.495    0.090    5.480    0.000
Code
lavaanPlot(model = m.DEM.BD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.98329406      0.95   satisfactory
2   AGFI 0.91647031      0.90   satisfactory
3    NFI 0.96153324      0.90   satisfactory
4   NNFI 0.92596662      0.90   satisfactory
5    CFI 0.97532221      0.90   satisfactory
6  RMSEA 0.08919372      0.05           poor
7   SRMR 0.06093312      0.08   satisfactory
8    RFI 0.88459973      0.90           poor
9   PNFI 0.32051108      0.50           poor
10   IFI 0.97606829      0.90   satisfactory
Code
m.PA.UD <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.fit <- sem(m.PA.UD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                               123.718
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.998
  Tucker-Lewis Index (TLI)                       0.990

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -540.620
  Loglikelihood unrestricted model (H1)       -540.001
                                                      
  Akaike (AIC)                                1093.240
  Bayesian (BIC)                              1113.000
  Sample-size adjusted Bayesian (SABIC)       1093.992

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.333    0.083    4.021    0.000
    DEM_dsHT   (d)   -0.400    0.032  -12.671    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.171    0.057    3.012    0.003
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.220    0.072    3.036    0.002

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.880    0.086   10.197    0.000
   .PA_dsSUP          0.892    0.069   12.932    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.435
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.038    0.019    1.937    0.053
    total            -0.029    0.095   -0.310    0.757
Code
lavaanPlot(model = m.PA.UD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99501765      0.95   satisfactory
2   AGFI 0.95017648      0.90   satisfactory
3    NFI 0.98998535      0.90   satisfactory
4   NNFI 0.98993436      0.90   satisfactory
5    CFI 0.99798687      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02728922      0.08   satisfactory
8    RFI 0.94992676      0.90   satisfactory
9   PNFI 0.19799707      0.50           poor
10   IFI 0.99805249      0.90   satisfactory
Code
m.PA.BD <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.fit <- sem(m.PA.BD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 10 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 3.818
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.148

Model Test Baseline Model:

  Test statistic                               134.305
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.986
  Tucker-Lewis Index (TLI)                       0.957

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -817.550
  Loglikelihood unrestricted model (H1)       -815.641
                                                      
  Akaike (AIC)                                1649.099
  Bayesian (BIC)                              1672.152
  Sample-size adjusted Bayesian (SABIC)       1649.976

Root Mean Square Error of Approximation:

  RMSEA                                          0.068
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.171
  P-value H_0: RMSEA <= 0.050                    0.286
  P-value H_0: RMSEA >= 0.080                    0.523

Standardized Root Mean Square Residual:

  SRMR                                           0.050

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.183    0.033    5.479    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.183    0.033    5.479    0.000
  AL_dsCTL ~                                          
    DEM_dsHT   (d)   -0.421    0.031  -13.811    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.133    0.063    2.108    0.035
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.218    0.073    2.979    0.003

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.901    0.087   10.370    0.000
   .s_LPLA_P_time     0.853    0.166    5.135    0.000
   .PA_dsSUP          0.893    0.070   12.716    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.414
    s_LPLA_P_time     0.124
    PA_dsSUP          0.030

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.029    0.017    1.675    0.094
    total            -0.209    0.045   -4.673    0.000
Code
lavaanPlot(model = m.PA.BD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.98851019      0.95   satisfactory
2   AGFI 0.94255096      0.90   satisfactory
3    NFI 0.97157390      0.90   satisfactory
4   NNFI 0.95749718      0.90   satisfactory
5    CFI 0.98583239      0.90   satisfactory
6  RMSEA 0.06758173      0.05           poor
7   SRMR 0.05015564      0.08   satisfactory
8    RFI 0.91472169      0.90   satisfactory
9   PNFI 0.32385797      0.50           poor
10   IFI 0.98626072      0.90   satisfactory
Code
m.DEM.PA.UD <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.fit <- sem(m.DEM.PA.UD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                               134.305
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.998
  Tucker-Lewis Index (TLI)                       0.989

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -907.534
  Loglikelihood unrestricted model (H1)       -906.915
                                                      
  Akaike (AIC)                                1831.069
  Bayesian (BIC)                              1857.415
  Sample-size adjusted Bayesian (SABIC)       1832.071

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.333    0.079    4.213    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.360    0.092   -3.924    0.000
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.400    0.031  -12.823    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.171    0.059    2.898    0.004
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.220    0.072    3.058    0.002

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.880    0.083   10.608    0.000
   .DEM_dsHT          2.339    0.304    7.685    0.000
   .PA_dsSUP          0.892    0.068   13.042    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.435
    DEM_dsHT          0.052
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.144    0.039    3.664    0.000
    a2b2              0.038    0.020    1.896    0.058
    total             0.514    0.092    5.569    0.000
Code
lavaanPlot(model = m.DEM.PA.UD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99592155      0.95   satisfactory
2   AGFI 0.95921553      0.90   satisfactory
3    NFI 0.99077480      0.90   satisfactory
4   NNFI 0.98882377      0.90   satisfactory
5    CFI 0.99813730      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02728922      0.08   satisfactory
8    RFI 0.94464879      0.90   satisfactory
9   PNFI 0.16512913      0.50           poor
10   IFI 0.99820716      0.90   satisfactory
Code
m.DEM.PA.BD <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCTL
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.fit <- sem(m.DEM.PA.BD, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.BD.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 13 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.374
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.241

Model Test Baseline Model:

  Test statistic                               134.305
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.997
  Tucker-Lewis Index (TLI)                       0.983

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -1188.535
  Loglikelihood unrestricted model (H1)      -1187.849
                                                      
  Akaike (AIC)                                2395.071
  Bayesian (BIC)                              2424.711
  Sample-size adjusted Bayesian (SABIC)       2396.198

Root Mean Square Error of Approximation:

  RMSEA                                          0.043
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.200
  P-value H_0: RMSEA <= 0.050                    0.351
  P-value H_0: RMSEA >= 0.080                    0.507

Standardized Root Mean Square Residual:

  SRMR                                           0.029

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.166    0.033    5.048    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.166    0.033    5.048    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.188    0.098   -1.918    0.055
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.411    0.033  -12.426    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.135    0.061    2.211    0.027
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.225    0.073    3.058    0.002

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.906    0.086   10.529    0.000
   .s_LPLA_P_time     0.861    0.166    5.188    0.000
   .DEM_dsHT          2.368    0.320    7.398    0.000
   .PA_dsSUP          0.893    0.068   13.131    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.417
    s_LPLA_P_time     0.127
    DEM_dsHT          0.040
    PA_dsSUP          0.030

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.077    0.041    1.874    0.061
    a2b2              0.030    0.017    1.758    0.079
    total             0.274    0.050    5.446    0.000
Code
lavaanPlot(model = m.DEM.PA.BD.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99656963      0.95   satisfactory
2   AGFI 0.96569632      0.90   satisfactory
3    NFI 0.98977132      0.90   satisfactory
4   NNFI 0.98252137      0.90   satisfactory
5    CFI 0.99708689      0.90   satisfactory
6  RMSEA 0.04333853      0.05   satisfactory
7   SRMR 0.02896112      0.08   satisfactory
8    RFI 0.93862794      0.90   satisfactory
9   PNFI 0.16496189      0.50           poor
10   IFI 0.99719616      0.90   satisfactory
Code
anova(m.DEM.UD.fit, m.DEM.BD.fit,m.PA.UD.fit,m.PA.BD.fit, m.DEM.PA.UD.fit, m.DEM.PA.BD.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan WARNING:
    Some restricted models fit better than less restricted models;
    either these models are not nested, or the less restricted model
    failed to reach a global optimum. Smallest difference =
    -1.34851480908035
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                Df    AIC    BIC  Chisq Chisq diff   RMSEA Df diff Pr(>Chisq)  
m.DEM.UD.fit     1 1285.0 1304.8 1.2390                                        
m.PA.UD.fit      1 1093.2 1113.0 1.2390     0.0000 0.00000       0             
m.DEM.PA.UD.fit  1 1831.1 1857.4 1.2390     0.0000 0.00000       0             
m.DEM.PA.BD.fit  1 2395.1 2424.7 1.3738     0.1348 0.00000       0             
m.DEM.BD.fit     2 1846.5 1869.6 5.1663     3.7925 0.11846       1    0.05148 .
m.PA.BD.fit      2 1649.1 1672.2 3.8178    -1.3485 0.00000       0             
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

4.3 Outcome measure: CM

Code
m.DEM.UD.cm <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.cm.fit <- sem(m.DEM.UD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                                83.973
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.997
  Tucker-Lewis Index (TLI)                       0.985

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -647.161
  Loglikelihood unrestricted model (H1)       -646.542
                                                      
  Akaike (AIC)                                1306.322
  Bayesian (BIC)                              1326.082
  Sample-size adjusted Bayesian (SABIC)       1307.074

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.100    0.051    1.968    0.049
    PA_dsSUP   (d)    0.142    0.074    1.907    0.057
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.360    0.096   -3.755    0.000
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.376    0.094   -3.999    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.979    0.218    4.498    0.000
   .DEM_dsHT          2.339    0.300    7.808    0.000

R-Square:
                   Estimate
    AL_dsCM           0.298
    DEM_dsHT          0.052

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.136    0.059    2.313    0.021
    total             0.377    0.080    4.704    0.000
Code
lavaanPlot(model = m.DEM.UD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99384930      0.95   satisfactory
2   AGFI 0.93849297      0.90   satisfactory
3    NFI 0.98524532      0.90   satisfactory
4   NNFI 0.98486855      0.90   satisfactory
5    CFI 0.99697371      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02695806      0.08   satisfactory
8    RFI 0.92622658      0.90   satisfactory
9   PNFI 0.19704906      0.50           poor
10   IFI 0.99711960      0.90   satisfactory
Code
m.DEM.BD.cm <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.cm.fit <- sem(m.DEM.BD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 10 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 7.053
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.029

Model Test Baseline Model:

  Test statistic                                90.294
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.940
  Tucker-Lewis Index (TLI)                       0.820

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -927.841
  Loglikelihood unrestricted model (H1)       -924.315
                                                      
  Akaike (AIC)                                1869.683
  Bayesian (BIC)                              1892.736
  Sample-size adjusted Bayesian (SABIC)       1870.559

Root Mean Square Error of Approximation:

  RMSEA                                          0.113
  90 Percent confidence interval - lower         0.031
  90 Percent confidence interval - upper         0.208
  P-value H_0: RMSEA <= 0.050                    0.090
  P-value H_0: RMSEA >= 0.080                    0.791

Standardized Root Mean Square Residual:

  SRMR                                           0.068

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.055    0.023    2.348    0.019
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.055    0.023    2.348    0.019
  AL_dsCM ~                                           
    PA_dsSUP   (d)    0.150    0.076    1.986    0.047
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.311    0.106   -2.941    0.003
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.375    0.092   -4.081    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.981    0.212    4.630    0.000
   .s_LPLA_P_time     0.962    0.179    5.377    0.000
   .DEM_dsHT          2.341    0.301    7.774    0.000

R-Square:
                   Estimate
    AL_dsCM           0.292
    s_LPLA_P_time     0.023
    DEM_dsHT          0.051

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.117    0.054    2.148    0.032
    total             0.322    0.075    4.286    0.000
Code
lavaanPlot(model = m.DEM.BD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.97732932      0.95   satisfactory
2   AGFI 0.88664662      0.90           poor
3    NFI 0.92189056      0.90   satisfactory
4   NNFI 0.82017206      0.90           poor
5    CFI 0.94005735      0.90   satisfactory
6  RMSEA 0.11267396      0.05           poor
7   SRMR 0.06796922      0.08   satisfactory
8    RFI 0.76567168      0.90           poor
9   PNFI 0.30729685      0.50           poor
10   IFI 0.94277296      0.90   satisfactory
Code
m.PA.UD.cm <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.cm.fit <- sem(m.PA.UD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                                79.706
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.997
  Tucker-Lewis Index (TLI)                       0.984

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -551.254
  Loglikelihood unrestricted model (H1)       -550.635
                                                      
  Akaike (AIC)                                1114.509
  Bayesian (BIC)                              1134.269
  Sample-size adjusted Bayesian (SABIC)       1115.260

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.100    0.052    1.917    0.055
    DEM_dsHT   (d)   -0.376    0.098   -3.837    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.171    0.060    2.828    0.005
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.142    0.077    1.846    0.065

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.979    0.222    4.407    0.000
   .PA_dsSUP          0.892    0.068   13.110    0.000

R-Square:
                   Estimate
    AL_dsCM           0.298
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.024    0.017    1.411    0.158
    total            -0.253    0.115   -2.192    0.028
Code
lavaanPlot(model = m.PA.UD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99428574      0.95   satisfactory
2   AGFI 0.94285742      0.90   satisfactory
3    NFI 0.98445550      0.90   satisfactory
4   NNFI 0.98400436      0.90   satisfactory
5    CFI 0.99680087      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02695806      0.08   satisfactory
8    RFI 0.92227751      0.90   satisfactory
9   PNFI 0.19689110      0.50           poor
10   IFI 0.99696346      0.90   satisfactory
Code
m.PA.BD.cm <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.cm.fit <- sem(m.PA.BD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 7 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 8.633
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.013

Model Test Baseline Model:

  Test statistic                                90.294
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.921
  Tucker-Lewis Index (TLI)                       0.764

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -830.591
  Loglikelihood unrestricted model (H1)       -826.275
                                                      
  Akaike (AIC)                                1675.183
  Bayesian (BIC)                              1698.236
  Sample-size adjusted Bayesian (SABIC)       1676.060

Root Mean Square Error of Approximation:

  RMSEA                                          0.129
  90 Percent confidence interval - lower         0.050
  90 Percent confidence interval - upper         0.223
  P-value H_0: RMSEA <= 0.050                    0.050
  P-value H_0: RMSEA >= 0.080                    0.866

Standardized Root Mean Square Residual:

  SRMR                                           0.071

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.077    0.021    3.760    0.000
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.077    0.021    3.760    0.000
  AL_dsCM ~                                           
    DEM_dsHT   (d)   -0.380    0.093   -4.078    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.162    0.060    2.693    0.007
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.132    0.078    1.685    0.092

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.980    0.222    4.418    0.000
   .s_LPLA_P_time     0.955    0.175    5.441    0.000
   .PA_dsSUP          0.892    0.069   12.997    0.000

R-Square:
                   Estimate
    AL_dsCM           0.291
    s_LPLA_P_time     0.023
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.021    0.016    1.364    0.173
    total            -0.282    0.097   -2.907    0.004
Code
lavaanPlot(model = m.PA.BD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.97366311      0.95   satisfactory
2   AGFI 0.86831556      0.90           poor
3    NFI 0.90438923      0.90   satisfactory
4   NNFI 0.76393084      0.90           poor
5    CFI 0.92131028      0.90   satisfactory
6  RMSEA 0.12909654      0.05           poor
7   SRMR 0.07096947      0.08   satisfactory
8    RFI 0.71316768      0.90           poor
9   PNFI 0.30146308      0.50           poor
10   IFI 0.92487519      0.90   satisfactory
Code
m.DEM.PA.UD.cm <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.cm.fit <- sem(m.DEM.PA.UD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.239
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.266

Model Test Baseline Model:

  Test statistic                                90.294
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.997
  Tucker-Lewis Index (TLI)                       0.983

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -918.169
  Loglikelihood unrestricted model (H1)       -917.549
                                                      
  Akaike (AIC)                                1852.338
  Bayesian (BIC)                              1878.684
  Sample-size adjusted Bayesian (SABIC)       1853.340

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.195
  P-value H_0: RMSEA <= 0.050                    0.376
  P-value H_0: RMSEA >= 0.080                    0.481

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)    0.100    0.051    1.967    0.049
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.360    0.097   -3.725    0.000
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.376    0.093   -4.047    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.171    0.061    2.807    0.005
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.142    0.075    1.895    0.058

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.979    0.215    4.549    0.000
   .DEM_dsHT          2.339    0.290    8.059    0.000
   .PA_dsSUP          0.892    0.068   13.155    0.000

R-Square:
                   Estimate
    AL_dsCM           0.298
    DEM_dsHT          0.052
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.136    0.058    2.321    0.020
    a2b2              0.024    0.017    1.470    0.142
    total             0.259    0.065    4.005    0.000
Code
lavaanPlot(model = m.DEM.PA.UD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99587394      0.95   satisfactory
2   AGFI 0.95873943      0.90   satisfactory
3    NFI 0.98627814      0.90   satisfactory
4   NNFI 0.98298836      0.90   satisfactory
5    CFI 0.99716473      0.90   satisfactory
6  RMSEA 0.03465517      0.05   satisfactory
7   SRMR 0.02695806      0.08   satisfactory
8    RFI 0.91766884      0.90   satisfactory
9   PNFI 0.16437969      0.50           poor
10   IFI 0.99732349      0.90   satisfactory
Code
m.DEM.PA.BD.cm <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCM
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.cm.fit <- sem(m.DEM.PA.BD.cm, data=df.1, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.BD.cm.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                           199

Model Test User Model:
                                                      
  Test statistic                                 1.245
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.264

Model Test Baseline Model:

  Test statistic                                90.294
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.997
  Tucker-Lewis Index (TLI)                       0.983

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -1199.105
  Loglikelihood unrestricted model (H1)      -1198.483
                                                      
  Akaike (AIC)                                2416.211
  Bayesian (BIC)                              2445.851
  Sample-size adjusted Bayesian (SABIC)       2417.338

Root Mean Square Error of Approximation:

  RMSEA                                          0.035
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.196
  P-value H_0: RMSEA <= 0.050                    0.375
  P-value H_0: RMSEA >= 0.080                    0.483

Standardized Root Mean Square Residual:

  SRMR                                           0.027

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)    0.049    0.024    2.045    0.041
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.049    0.024    2.045    0.041
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.315    0.107   -2.949    0.003
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.377    0.095   -3.967    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.164    0.059    2.776    0.005
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.142    0.072    1.976    0.048

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.981    0.217    4.513    0.000
   .s_LPLA_P_time     0.964    0.179    5.373    0.000
   .DEM_dsHT          2.341    0.303    7.715    0.000
   .PA_dsSUP          0.892    0.069   12.858    0.000

R-Square:
                   Estimate
    AL_dsCM           0.296
    s_LPLA_P_time     0.022
    DEM_dsHT          0.051
    PA_dsSUP          0.031

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.119    0.057    2.071    0.038
    a2b2              0.023    0.016    1.493    0.135
    total             0.192    0.048    4.013    0.000
Code
lavaanPlot(model = m.DEM.PA.BD.cm.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.cm.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99689088      0.95   satisfactory
2   AGFI 0.96890876      0.90   satisfactory
3    NFI 0.98621009      0.90   satisfactory
4   NNFI 0.98255101      0.90   satisfactory
5    CFI 0.99709183      0.90   satisfactory
6  RMSEA 0.03509782      0.05   satisfactory
7   SRMR 0.02704097      0.08   satisfactory
8    RFI 0.91726055      0.90   satisfactory
9   PNFI 0.16436835      0.50           poor
10   IFI 0.99725468      0.90   satisfactory
Code
anova(m.DEM.UD.cm.fit, m.DEM.BD.cm.fit, m.PA.UD.cm.fit, m.PA.BD.cm.fit, m.DEM.PA.UD.cm.fit, m.DEM.PA.BD.cm.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                   Df    AIC    BIC  Chisq Chisq diff   RMSEA Df diff
m.DEM.UD.cm.fit     1 1306.3 1326.1 1.2390                           
m.PA.UD.cm.fit      1 1114.5 1134.3 1.2390     0.0000 0.00000       0
m.DEM.PA.UD.cm.fit  1 1852.3 1878.7 1.2390     0.0000 0.00000       0
m.DEM.PA.BD.cm.fit  1 2416.2 2445.8 1.2451     0.0061 0.00000       0
m.DEM.BD.cm.fit     2 1869.7 1892.7 7.0528     5.8076 0.15543       1
m.PA.BD.cm.fit      2 1675.2 1698.2 8.6330     1.5803 0.00000       0
                   Pr(>Chisq)  
m.DEM.UD.cm.fit                
m.PA.UD.cm.fit                 
m.DEM.PA.UD.cm.fit             
m.DEM.PA.BD.cm.fit             
m.DEM.BD.cm.fit       0.01596 *
m.PA.BD.cm.fit                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

4.4 By cycle

Work in progress

4.5 Cycle 2

4.5.1 Outcome measure : CTL

Code
df.c2 <- df.1 %>% filter(cycle=="2")
m.DEM.UD.c2 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.c2.fit <- sem(m.DEM.UD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                78.386
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.031

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -340.370
  Loglikelihood unrestricted model (H1)       -340.095
                                                      
  Akaike (AIC)                                 692.741
  Bayesian (BIC)                               708.491
  Sample-size adjusted Bayesian (SABIC)        689.539

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.026

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.276    0.175    1.575    0.115
    PA_dsSUP   (d)    0.411    0.109    3.757    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.557    0.192   -2.905    0.004
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.418    0.041  -10.167    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.946    0.122    7.759    0.000
   .DEM_dsHT          2.869    0.493    5.821    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.503
    DEM_dsHT          0.080

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.233    0.079    2.955    0.003
    total             0.919    0.216    4.251    0.000
Code
lavaanPlot(model = m.DEM.UD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99491520      0.95   satisfactory
2   AGFI 0.94915200      0.90   satisfactory
3    NFI 0.99297267      0.90   satisfactory
4   NNFI 1.03060189      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02552154      0.08   satisfactory
8    RFI 0.96486334      0.90   satisfactory
9   PNFI 0.19859453      0.50           poor
10   IFI 1.00580402      0.90   satisfactory
Code
m.DEM.BD.c2 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.c2.fit <- sem(m.DEM.BD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 13 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 7.289
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.026

Model Test Baseline Model:

  Test statistic                                88.752
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.936
  Tucker-Lewis Index (TLI)                       0.808

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -472.354
  Loglikelihood unrestricted model (H1)       -468.710
                                                      
  Akaike (AIC)                                 958.709
  Bayesian (BIC)                               977.084
  Sample-size adjusted Bayesian (SABIC)        954.973

Root Mean Square Error of Approximation:

  RMSEA                                          0.161
  90 Percent confidence interval - lower         0.047
  90 Percent confidence interval - upper         0.294
  P-value H_0: RMSEA <= 0.050                    0.053
  P-value H_0: RMSEA >= 0.080                    0.897

Standardized Root Mean Square Residual:

  SRMR                                           0.078

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.146    0.062    2.341    0.019
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.146    0.062    2.341    0.019
  AL_dsCTL ~                                          
    PA_dsSUP   (d)    0.450    0.104    4.340    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.326    0.151   -2.167    0.030
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.421    0.040  -10.568    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.958    0.120    8.014    0.000
   .s_LPLA_P_time     0.697    0.253    2.752    0.006
   .DEM_dsHT          2.912    0.522    5.578    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.482
    s_LPLA_P_time     0.125
    DEM_dsHT          0.066

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.137    0.064    2.141    0.032
    total             0.733    0.135    5.419    0.000
Code
lavaanPlot(model = m.DEM.BD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.95648076      0.95   satisfactory
2   AGFI 0.78240380      0.90           poor
3    NFI 0.91787052      0.90   satisfactory
4   NNFI 0.80825306      0.90           poor
5    CFI 0.93608435      0.90   satisfactory
6  RMSEA 0.16101879      0.05           poor
7   SRMR 0.07778028      0.08   satisfactory
8    RFI 0.75361155      0.90           poor
9   PNFI 0.30595684      0.50           poor
10   IFI 0.93903142      0.90   satisfactory
Code
m.PA.UD.c2 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.c2.fit <- sem(m.PA.UD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                80.218
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.030

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -272.184
  Loglikelihood unrestricted model (H1)       -271.909
                                                      
  Akaike (AIC)                                 556.369
  Bayesian (BIC)                               572.118
  Sample-size adjusted Bayesian (SABIC)        553.167

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.026

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.276    0.188    1.464    0.143
    DEM_dsHT   (d)   -0.418    0.043   -9.645    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.316    0.084    3.769    0.000
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.411    0.111    3.713    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.946    0.121    7.830    0.000
   .PA_dsSUP          0.754    0.074   10.240    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.503
    PA_dsSUP          0.097

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.130    0.053    2.450    0.014
    total            -0.012    0.214   -0.057    0.954
Code
lavaanPlot(model = m.PA.UD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99590818      0.95   satisfactory
2   AGFI 0.95908175      0.90   satisfactory
3    NFI 0.99313312      0.90   satisfactory
4   NNFI 1.02985670      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02552154      0.08   satisfactory
8    RFI 0.96566562      0.90   satisfactory
9   PNFI 0.19862662      0.50           poor
10   IFI 1.00566983      0.90   satisfactory
Code
m.PA.BD.c2 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.c2.fit <- sem(m.PA.BD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 10 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 3.361
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.186

Model Test Baseline Model:

  Test statistic                                88.752
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.984
  Tucker-Lewis Index (TLI)                       0.951

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -403.120
  Loglikelihood unrestricted model (H1)       -401.440
                                                      
  Akaike (AIC)                                 820.240
  Bayesian (BIC)                               838.615
  Sample-size adjusted Bayesian (SABIC)        816.504

Root Mean Square Error of Approximation:

  RMSEA                                          0.082
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.229
  P-value H_0: RMSEA <= 0.050                    0.264
  P-value H_0: RMSEA >= 0.080                    0.622

Standardized Root Mean Square Residual:

  SRMR                                           0.048

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.154    0.061    2.538    0.011
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.154    0.061    2.538    0.011
  AL_dsCTL ~                                          
    DEM_dsHT   (d)   -0.436    0.037  -11.711    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.256    0.079    3.243    0.001
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.400    0.106    3.788    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.957    0.121    7.895    0.000
   .s_LPLA_P_time     0.693    0.239    2.901    0.004
   .PA_dsSUP          0.756    0.076    9.977    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.485
    s_LPLA_P_time     0.127
    PA_dsSUP          0.092

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.102    0.043    2.372    0.018
    total            -0.179    0.069   -2.591    0.010
Code
lavaanPlot(model = m.PA.BD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.98123792      0.95   satisfactory
2   AGFI 0.90618962      0.90   satisfactory
3    NFI 0.96213230      0.90   satisfactory
4   NNFI 0.95066617      0.90   satisfactory
5    CFI 0.98355539      0.90   satisfactory
6  RMSEA 0.08167418      0.05           poor
7   SRMR 0.04832082      0.08   satisfactory
8    RFI 0.88639690      0.90           poor
9   PNFI 0.32071077      0.50           poor
10   IFI 0.98431363      0.90   satisfactory
Code
m.DEM.PA.UD.c2 <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.c2.fit <- sem(m.DEM.PA.UD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                88.752
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.033

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -470.672
  Loglikelihood unrestricted model (H1)       -470.397
                                                      
  Akaike (AIC)                                 957.345
  Bayesian (BIC)                               978.345
  Sample-size adjusted Bayesian (SABIC)        953.076

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.026

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.276    0.192    1.439    0.150
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.557    0.181   -3.080    0.002
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.418    0.043   -9.662    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.316    0.081    3.897    0.000
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.411    0.108    3.801    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.946    0.119    7.930    0.000
   .DEM_dsHT          2.869    0.502    5.714    0.000
   .PA_dsSUP          0.754    0.076    9.911    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.503
    DEM_dsHT          0.080
    PA_dsSUP          0.097

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.233    0.071    3.279    0.001
    a2b2              0.130    0.050    2.572    0.010
    total             0.638    0.231    2.765    0.006
Code
lavaanPlot(model = m.DEM.PA.UD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99653224      0.95   satisfactory
2   AGFI 0.96532241      0.90   satisfactory
3    NFI 0.99379338      0.90   satisfactory
4   NNFI 1.03256635      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02552154      0.08   satisfactory
8    RFI 0.96276026      0.90   satisfactory
9   PNFI 0.16563223      0.50           poor
10   IFI 1.00511846      0.90   satisfactory
Code
m.DEM.PA.BD.c2 <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCTL
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.c2.fit <- sem(m.DEM.PA.BD.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)
Warning in lav_model_nvcov_bootstrap(lavmodel = lavmodel, lavsamplestats =
lavsamplestats, : lavaan WARNING: 1 bootstrap runs failed or did not converge.
Code
summary(m.DEM.PA.BD.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 14 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.490

Model Test Baseline Model:

  Test statistic                                88.752
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.038

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -604.432
  Loglikelihood unrestricted model (H1)       -604.194
                                                      
  Akaike (AIC)                                1226.865
  Bayesian (BIC)                              1250.489
  Sample-size adjusted Bayesian (SABIC)       1222.062

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.230
  P-value H_0: RMSEA <= 0.050                    0.543
  P-value H_0: RMSEA >= 0.080                    0.386

Standardized Root Mean Square Residual:

  SRMR                                           0.024

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws             999

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.121    0.069    1.751    0.080
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.121    0.069    1.751    0.080
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.363    0.168   -2.158    0.031
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.426    0.041  -10.514    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.266    0.083    3.197    0.001
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.419    0.109    3.860    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.964    0.118    8.163    0.000
   .s_LPLA_P_time     0.710    0.257    2.764    0.006
   .DEM_dsHT          2.900    0.521    5.560    0.000
   .PA_dsSUP          0.756    0.075   10.012    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.493
    s_LPLA_P_time     0.120
    DEM_dsHT          0.071
    PA_dsSUP          0.094

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.155    0.074    2.078    0.038
    a2b2              0.112    0.050    2.252    0.024
    total             0.387    0.090    4.311    0.000
Code
lavaanPlot(model = m.DEM.PA.BD.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99768132      0.95   satisfactory
2   AGFI 0.97681320      0.90   satisfactory
3    NFI 0.99464175      0.90   satisfactory
4   NNFI 1.03802565      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02389854      0.08   satisfactory
8    RFI 0.96785049      0.90   satisfactory
9   PNFI 0.16577362      0.50           poor
10   IFI 1.00597650      0.90   satisfactory
Code
anova(m.DEM.UD.c2.fit, m.DEM.BD.c2.fit,m.PA.UD.c2.fit,m.PA.BD.c2.fit, m.DEM.PA.UD.c2.fit, m.DEM.PA.BD.c2.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan WARNING:
    Some restricted models fit better than less restricted models;
    either these models are not nested, or the less restricted model
    failed to reach a global optimum. Smallest difference =
    -3.9283015008133
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                   Df     AIC     BIC  Chisq Chisq diff   RMSEA Df diff
m.DEM.UD.c2.fit     1  692.74  708.49 0.5508                           
m.PA.UD.c2.fit      1  556.37  572.12 0.5508     0.0000 0.00000       0
m.DEM.PA.UD.c2.fit  1  957.34  978.34 0.5508     0.0000 0.00000       0
m.DEM.PA.BD.c2.fit  1 1226.86 1250.49 0.4756    -0.0753 0.00000       0
m.DEM.BD.c2.fit     2  958.71  977.08 7.2891     6.8136 0.23874       1
m.PA.BD.c2.fit      2  820.24  838.61 3.3608    -3.9283 0.00000       0
                   Pr(>Chisq)   
m.DEM.UD.c2.fit                 
m.PA.UD.c2.fit                  
m.DEM.PA.UD.c2.fit              
m.DEM.PA.BD.c2.fit              
m.DEM.BD.c2.fit      0.009047 **
m.PA.BD.c2.fit                  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

4.5.2 Outcome measure: CM

Code
m.DEM.UD.cm.c2 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.cm.c2.fit <- sem(m.DEM.UD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                58.083
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.042

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -360.265
  Loglikelihood unrestricted model (H1)       -359.990
                                                      
  Akaike (AIC)                                 732.531
  Bayesian (BIC)                               748.281
  Sample-size adjusted Bayesian (SABIC)        729.329

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.025

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)   -0.040    0.095   -0.417    0.676
    PA_dsSUP   (d)    0.340    0.130    2.609    0.009
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.557    0.186   -2.987    0.003
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.499    0.126   -3.950    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.397    0.346    4.037    0.000
   .DEM_dsHT          2.869    0.512    5.607    0.000

R-Square:
                   Estimate
    AL_dsCM           0.391
    DEM_dsHT          0.080

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.278    0.141    1.966    0.049
    total             0.578    0.160    3.603    0.000
Code
lavaanPlot(model = m.DEM.UD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.cm.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99467549      0.95   satisfactory
2   AGFI 0.94675488      0.90   satisfactory
3    NFI 0.99051616      0.90   satisfactory
4   NNFI 1.04230685      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02543241      0.08   satisfactory
8    RFI 0.95258079      0.90   satisfactory
9   PNFI 0.19810323      0.50           poor
10   IFI 1.00786845      0.90   satisfactory
Code
m.DEM.BD.cm.c2 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.cm.c2.fit <- sem(m.DEM.BD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                10.924
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.004

Model Test Baseline Model:

  Test statistic                                68.448
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.857
  Tucker-Lewis Index (TLI)                       0.571

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -494.067
  Loglikelihood unrestricted model (H1)       -488.605
                                                      
  Akaike (AIC)                                1002.134
  Bayesian (BIC)                              1020.509
  Sample-size adjusted Bayesian (SABIC)        998.398

Root Mean Square Error of Approximation:

  RMSEA                                          0.209
  90 Percent confidence interval - lower         0.100
  90 Percent confidence interval - upper         0.338
  P-value H_0: RMSEA <= 0.050                    0.011
  P-value H_0: RMSEA >= 0.080                    0.972

Standardized Root Mean Square Residual:

  SRMR                                           0.098

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.013    0.028    0.456    0.648
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.013    0.028    0.456    0.648
  AL_dsCM ~                                           
    PA_dsSUP   (d)    0.324    0.133    2.441    0.015
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.534    0.205   -2.610    0.009
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.489    0.127   -3.837    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.399    0.341    4.099    0.000
   .s_LPLA_P_time     0.800    0.256    3.125    0.002
   .DEM_dsHT          2.870    0.491    5.840    0.000

R-Square:
                   Estimate
    AL_dsCM           0.378
    s_LPLA_P_time     0.008
    DEM_dsHT          0.080

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.261    0.144    1.818    0.069
    total             0.598    0.167    3.588    0.000
Code
lavaanPlot(model = m.DEM.BD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.cm.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.93666223      0.95           poor
2   AGFI 0.68331117      0.90           poor
3    NFI 0.84040037      0.90           poor
4   NNFI 0.57127822      0.90           poor
5    CFI 0.85709274      0.90           poor
6  RMSEA 0.20915622      0.05           poor
7   SRMR 0.09752428      0.08           poor
8    RFI 0.52120112      0.90           poor
9   PNFI 0.28013346      0.50           poor
10   IFI 0.86569541      0.90           poor
Code
m.PA.UD.cm.c2 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.cm.c2.fit <- sem(m.PA.UD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                59.914
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.041

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -292.079
  Loglikelihood unrestricted model (H1)       -291.804
                                                      
  Akaike (AIC)                                 596.158
  Bayesian (BIC)                               611.908
  Sample-size adjusted Bayesian (SABIC)        592.957

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.025

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)   -0.040    0.096   -0.416    0.678
    DEM_dsHT   (d)   -0.499    0.125   -3.995    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.316    0.084    3.748    0.000
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.340    0.127    2.682    0.007

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.397    0.330    4.230    0.000
   .PA_dsSUP          0.754    0.073   10.263    0.000

R-Square:
                   Estimate
    AL_dsCM           0.391
    PA_dsSUP          0.097

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.107    0.054    2.001    0.045
    total            -0.431    0.168   -2.571    0.010
Code
lavaanPlot(model = m.PA.UD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.cm.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99536813      0.95   satisfactory
2   AGFI 0.95368131      0.90   satisfactory
3    NFI 0.99080609      0.90   satisfactory
4   NNFI 1.04089574      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02543241      0.08   satisfactory
8    RFI 0.95403043      0.90   satisfactory
9   PNFI 0.19816122      0.50           poor
10   IFI 1.00762382      0.90   satisfactory
Code
m.PA.BD.cm.c2 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.cm.c2.fit <- sem(m.PA.BD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 10 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 8.081
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.018

Model Test Baseline Model:

  Test statistic                                68.448
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.903
  Tucker-Lewis Index (TLI)                       0.708

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -425.375
  Loglikelihood unrestricted model (H1)       -421.335
                                                      
  Akaike (AIC)                                 864.750
  Bayesian (BIC)                               883.125
  Sample-size adjusted Bayesian (SABIC)        861.014

Root Mean Square Error of Approximation:

  RMSEA                                          0.173
  90 Percent confidence interval - lower         0.061
  90 Percent confidence interval - upper         0.304
  P-value H_0: RMSEA <= 0.050                    0.038
  P-value H_0: RMSEA >= 0.080                    0.922

Standardized Root Mean Square Residual:

  SRMR                                           0.077

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.047    0.026    1.827    0.068
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.047    0.026    1.827    0.068
  AL_dsCM ~                                           
    DEM_dsHT   (d)   -0.487    0.121   -4.031    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.303    0.082    3.717    0.000
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.290    0.135    2.152    0.031

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.402    0.336    4.170    0.000
   .s_LPLA_P_time     0.786    0.247    3.183    0.001
   .PA_dsSUP          0.754    0.071   10.543    0.000

R-Square:
                   Estimate
    AL_dsCM           0.376
    s_LPLA_P_time     0.019
    PA_dsSUP          0.096

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.088    0.051    1.710    0.087
    total            -0.352    0.133   -2.645    0.008
Code
lavaanPlot(model = m.PA.BD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.cm.c2.fit)
    Name     Value Threshold Interpretation
1    GFI 0.9556183      0.95   satisfactory
2   AGFI 0.7780914      0.90           poor
3    NFI 0.8819406      0.90           poor
4   NNFI 0.7078726      0.90           poor
5    CFI 0.9026242      0.90   satisfactory
6  RMSEA 0.1726510      0.05           poor
7   SRMR 0.0770163      0.08   satisfactory
8    RFI 0.6458219      0.90           poor
9   PNFI 0.2939802      0.50           poor
10   IFI 0.9084860      0.90   satisfactory
Code
m.DEM.PA.UD.cm.c2 <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.cm.c2.fit <- sem(m.DEM.PA.UD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.551
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                68.448
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.043

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -490.567
  Loglikelihood unrestricted model (H1)       -490.292
                                                      
  Akaike (AIC)                                 997.135
  Bayesian (BIC)                              1018.135
  Sample-size adjusted Bayesian (SABIC)        992.866

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.512
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.025

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)   -0.040    0.099   -0.401    0.688
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.557    0.184   -3.022    0.003
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.499    0.131   -3.813    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.316    0.079    3.986    0.000
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.340    0.139    2.440    0.015

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.397    0.350    3.994    0.000
   .DEM_dsHT          2.869    0.499    5.750    0.000
   .PA_dsSUP          0.754    0.072   10.481    0.000

R-Square:
                   Estimate
    AL_dsCM           0.391
    DEM_dsHT          0.080
    PA_dsSUP          0.097

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.278    0.143    1.948    0.051
    a2b2              0.107    0.057    1.879    0.060
    total             0.346    0.139    2.492    0.013
Code
lavaanPlot(model = m.DEM.PA.UD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.cm.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99649949      0.95   satisfactory
2   AGFI 0.96499486      0.90   satisfactory
3    NFI 0.99195230      0.90   satisfactory
4   NNFI 1.04315467      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02543241      0.08   satisfactory
8    RFI 0.95171383      0.90   satisfactory
9   PNFI 0.16532538      0.50           poor
10   IFI 1.00665926      0.90   satisfactory
Code
m.DEM.PA.BD.cm.c2 <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCM
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.cm.c2.fit <- sem(m.DEM.PA.BD.cm.c2, data=df.c2, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.BD.cm.c2.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 12 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                           102

Model Test User Model:
                                                      
  Test statistic                                 0.550
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.458

Model Test Baseline Model:

  Test statistic                                68.448
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    1.000
  Tucker-Lewis Index (TLI)                       1.043

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -624.364
  Loglikelihood unrestricted model (H1)       -624.089
                                                      
  Akaike (AIC)                                1266.729
  Bayesian (BIC)                              1290.354
  Sample-size adjusted Bayesian (SABIC)       1261.926

Root Mean Square Error of Approximation:

  RMSEA                                          0.000
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.235
  P-value H_0: RMSEA <= 0.050                    0.513
  P-value H_0: RMSEA >= 0.080                    0.413

Standardized Root Mean Square Residual:

  SRMR                                           0.025

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)   -0.015    0.037   -0.404    0.686
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)   -0.015    0.037   -0.404    0.686
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.583    0.231   -2.526    0.012
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.499    0.128   -3.888    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.321    0.090    3.573    0.000
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.340    0.134    2.532    0.011

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           1.397    0.343    4.072    0.000
   .s_LPLA_P_time     0.816    0.258    3.159    0.002
   .DEM_dsHT          2.870    0.510    5.628    0.000
   .PA_dsSUP          0.754    0.075   10.104    0.000

R-Square:
                   Estimate
    AL_dsCM           0.391
    s_LPLA_P_time    -0.011
    DEM_dsHT          0.080
    PA_dsSUP          0.097

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.291    0.168    1.731    0.084
    a2b2              0.109    0.065    1.683    0.092
    total             0.385    0.169    2.277    0.023
Code
lavaanPlot(model = m.DEM.PA.BD.cm.c2.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.cm.c2.fit)
    Name      Value Threshold Interpretation
1    GFI 0.99731913      0.95   satisfactory
2   AGFI 0.97319132      0.90   satisfactory
3    NFI 0.99196685      0.90   satisfactory
4   NNFI 1.04325030      0.90   satisfactory
5    CFI 1.00000000      0.90   satisfactory
6  RMSEA 0.00000000      0.05   satisfactory
7   SRMR 0.02541498      0.08   satisfactory
8    RFI 0.95180107      0.90   satisfactory
9   PNFI 0.16532781      0.50           poor
10   IFI 1.00667402      0.90   satisfactory
Code
anova(m.DEM.UD.cm.c2.fit, m.DEM.BD.cm.c2.fit, m.PA.UD.cm.c2.fit, m.PA.BD.cm.c2.fit, m.DEM.PA.UD.cm.c2.fit, m.DEM.PA.BD.cm.c2.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan WARNING:
    Some restricted models fit better than less restricted models;
    either these models are not nested, or the less restricted model
    failed to reach a global optimum. Smallest difference =
    -2.8433420749944
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                      Df     AIC     BIC   Chisq Chisq diff   RMSEA Df diff
m.DEM.UD.cm.c2.fit     1  732.53  748.28  0.5508                           
m.PA.UD.cm.c2.fit      1  596.16  611.91  0.5508     0.0000 0.00000       0
m.DEM.PA.UD.cm.c2.fit  1  997.13 1018.13  0.5508     0.0000 0.00000       0
m.DEM.PA.BD.cm.c2.fit  1 1266.73 1290.35  0.5499    -0.0010 0.00000       0
m.DEM.BD.cm.c2.fit     2 1002.13 1020.51 10.9242    10.3744 0.30316       1
m.PA.BD.cm.c2.fit      2  864.75  883.12  8.0809    -2.8433 0.00000       0
                      Pr(>Chisq)   
m.DEM.UD.cm.c2.fit                 
m.PA.UD.cm.c2.fit                  
m.DEM.PA.UD.cm.c2.fit              
m.DEM.PA.BD.cm.c2.fit              
m.DEM.BD.cm.c2.fit      0.001278 **
m.PA.BD.cm.c2.fit                  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

4.6 Cycle 3

4.6.1 Outcome measure : CTL

Code
df.c3 <- df.1 %>% filter(cycle=="3")
m.DEM.UD.c3 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.c3.fit <- sem(m.DEM.UD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                58.636
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.917
  Tucker-Lewis Index (TLI)                       0.583

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -288.172
  Loglikelihood unrestricted model (H1)       -285.434
                                                      
  Akaike (AIC)                                 588.344
  Bayesian (BIC)                               603.792
  Sample-size adjusted Bayesian (SABIC)        584.846

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.081

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.339    0.071    4.740    0.000
    PA_dsSUP   (d)    0.062    0.103    0.603    0.546
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.215    0.124   -1.737    0.082
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.406    0.066   -6.122    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.757    0.117    6.456    0.000
   .DEM_dsHT          1.725    0.268    6.423    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.397
    DEM_dsHT          0.029

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.088    0.055    1.602    0.109
    total             0.488    0.129    3.794    0.000
Code
lavaanPlot(model = m.DEM.UD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.94903789      0.95           poor
2   AGFI 0.49037890      0.90           poor
3    NFI 0.90661055      0.90   satisfactory
4   NNFI 0.58274416      0.90           poor
5    CFI 0.91654883      0.90   satisfactory
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.08081569      0.08           poor
8    RFI 0.53305277      0.90           poor
9   PNFI 0.18132211      0.50           poor
10   IFI 0.92234040      0.90   satisfactory
Code
m.DEM.BD.c3 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.c3.fit <- sem(m.DEM.BD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 6.181
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.045

Model Test Baseline Model:

  Test statistic                                59.502
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.922
  Tucker-Lewis Index (TLI)                       0.766

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -431.421
  Loglikelihood unrestricted model (H1)       -428.331
                                                      
  Akaike (AIC)                                 876.843
  Bayesian (BIC)                               894.866
  Sample-size adjusted Bayesian (SABIC)        872.762

Root Mean Square Error of Approximation:

  RMSEA                                          0.147
  90 Percent confidence interval - lower         0.018
  90 Percent confidence interval - upper         0.285
  P-value H_0: RMSEA <= 0.050                    0.082
  P-value H_0: RMSEA >= 0.080                    0.855

Standardized Root Mean Square Residual:

  SRMR                                           0.092

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.195    0.039    5.055    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.195    0.039    5.055    0.000
  AL_dsCTL ~                                          
    PA_dsSUP   (d)    0.073    0.106    0.689    0.491
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.084    0.152   -0.551    0.581
  AL_dsCTL ~                                          
    DEM_dsHT   (b)   -0.416    0.068   -6.116    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.779    0.122    6.386    0.000
   .s_LPLA_P_time     0.984    0.207    4.743    0.000
   .DEM_dsHT          1.744    0.288    6.047    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.376
    s_LPLA_P_time     0.124
    DEM_dsHT          0.018

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.035    0.065    0.535    0.593
    total             0.303    0.129    2.347    0.019
Code
lavaanPlot(model = m.DEM.BD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.96052796      0.95   satisfactory
2   AGFI 0.80263979      0.90           poor
3    NFI 0.89611747      0.90           poor
4   NNFI 0.76554748      0.90           poor
5    CFI 0.92184916      0.90   satisfactory
6  RMSEA 0.14680886      0.05           poor
7   SRMR 0.09239585      0.08           poor
8    RFI 0.68835242      0.90           poor
9   PNFI 0.29870582      0.50           poor
10   IFI 0.92728552      0.90   satisfactory
Code
m.PA.UD.c3 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.c3.fit <- sem(m.PA.UD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 2 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                56.609
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.913
  Tucker-Lewis Index (TLI)                       0.566

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -261.387
  Loglikelihood unrestricted model (H1)       -258.649
                                                      
  Akaike (AIC)                                 534.773
  Bayesian (BIC)                               550.222
  Sample-size adjusted Bayesian (SABIC)        531.276

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.081

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.339    0.069    4.939    0.000
    DEM_dsHT   (d)   -0.406    0.065   -6.270    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.089    0.095    0.932    0.351
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.062    0.102    0.610    0.542

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.757    0.112    6.730    0.000
   .PA_dsSUP          0.993    0.098   10.166    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.397
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.006    0.014    0.397    0.691
    total            -0.062    0.098   -0.636    0.525
Code
lavaanPlot(model = m.PA.UD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.95665389      0.95   satisfactory
2   AGFI 0.56653887      0.90           poor
3    NFI 0.90326625      0.90   satisfactory
4   NNFI 0.56635450      0.90           poor
5    CFI 0.91327090      0.90   satisfactory
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.08081569      0.08           poor
8    RFI 0.51633126      0.90           poor
9   PNFI 0.18065325      0.50           poor
10   IFI 0.91950938      0.90   satisfactory
Code
m.PA.BD.c3 <- ' # direct effect
            AL_dsCTL ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCTL
            AL_dsCTL ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCTL ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.c3.fit <- sem(m.PA.BD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 9 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.915
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.052

Model Test Baseline Model:

  Test statistic                                59.502
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.927
  Tucker-Lewis Index (TLI)                       0.780

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -403.489
  Loglikelihood unrestricted model (H1)       -400.532
                                                      
  Akaike (AIC)                                 820.978
  Bayesian (BIC)                               839.001
  Sample-size adjusted Bayesian (SABIC)        816.898

Root Mean Square Error of Approximation:

  RMSEA                                          0.142
  90 Percent confidence interval - lower         0.000
  90 Percent confidence interval - upper         0.281
  P-value H_0: RMSEA <= 0.050                    0.091
  P-value H_0: RMSEA >= 0.080                    0.841

Standardized Root Mean Square Residual:

  SRMR                                           0.087

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_t (c)    0.202    0.038    5.338    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.202    0.038    5.338    0.000
  AL_dsCTL ~                                          
    DEM_dsHT   (d)   -0.426    0.066   -6.486    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.078    0.094    0.832    0.405
  AL_dsCTL ~                                          
    PA_dsSUP   (b)    0.056    0.111    0.510    0.610

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.777    0.119    6.542    0.000
   .s_LPLA_P_time     0.980    0.196    5.007    0.000
   .PA_dsSUP          0.993    0.100    9.953    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.376
    s_LPLA_P_time     0.122
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.004    0.014    0.310    0.756
    total            -0.220    0.075   -2.920    0.004
Code
lavaanPlot(model = m.PA.BD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.96446286      0.95   satisfactory
2   AGFI 0.82231430      0.90           poor
3    NFI 0.90059253      0.90   satisfactory
4   NNFI 0.78047820      0.90           poor
5    CFI 0.92682607      0.90   satisfactory
6  RMSEA 0.14205733      0.05           poor
7   SRMR 0.08656915      0.08           poor
8    RFI 0.70177759      0.90           poor
9   PNFI 0.30019751      0.50           poor
10   IFI 0.93191622      0.90   satisfactory
Code
m.DEM.PA.UD.c3 <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.c3.fit <- sem(m.DEM.PA.UD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                59.502
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.916
  Tucker-Lewis Index (TLI)                       0.498

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -425.453
  Loglikelihood unrestricted model (H1)       -422.715
                                                      
  Akaike (AIC)                                 866.906
  Bayesian (BIC)                               887.504
  Sample-size adjusted Bayesian (SABIC)        862.243

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.081

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.339    0.066    5.141    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.215    0.119   -1.813    0.070
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.406    0.067   -6.085    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.089    0.089    0.997    0.319
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.062    0.100    0.618    0.536

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.757    0.116    6.502    0.000
   .DEM_dsHT          1.725    0.274    6.294    0.000
   .PA_dsSUP          0.993    0.100    9.950    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.397
    DEM_dsHT          0.029
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.088    0.052    1.678    0.093
    a2b2              0.006    0.014    0.388    0.698
    total             0.432    0.076    5.696    0.000
Code
lavaanPlot(model = m.DEM.PA.UD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.96501930      0.95   satisfactory
2   AGFI 0.65019298      0.90           poor
3    NFI 0.90796974      0.90   satisfactory
4   NNFI 0.49803887      0.90           poor
5    CFI 0.91633981      0.90   satisfactory
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.08081569      0.08           poor
8    RFI 0.44781842      0.90           poor
9   PNFI 0.15132829      0.50           poor
10   IFI 0.92348997      0.90   satisfactory
Code
m.DEM.PA.BD.c3 <- '# direct effect
                  AL_dsCTL ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCTL
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCTL ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCTL ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.c3.fit <- sem(m.DEM.PA.BD.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.BD.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 12 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.534
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                59.502
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.915
  Tucker-Lewis Index (TLI)                       0.492

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -568.812
  Loglikelihood unrestricted model (H1)       -566.045
                                                      
  Akaike (AIC)                                1155.623
  Bayesian (BIC)                              1178.796
  Sample-size adjusted Bayesian (SABIC)       1150.377

Root Mean Square Error of Approximation:

  RMSEA                                          0.216
  90 Percent confidence interval - lower         0.071
  90 Percent confidence interval - upper         0.406
  P-value H_0: RMSEA <= 0.050                    0.034
  P-value H_0: RMSEA >= 0.080                    0.940

Standardized Root Mean Square Residual:

  SRMR                                           0.082

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCTL ~                                          
    s_LPLA_P_  (c)    0.194    0.039    4.957    0.000
  s_LPLA_P_time ~                                     
    AL_dsCTL   (c)    0.194    0.039    4.957    0.000
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.083    0.145   -0.576    0.564
  AL_dsCTL ~                                          
    DEM_dsHT  (b1)   -0.419    0.066   -6.344    0.000
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.078    0.096    0.811    0.417
  AL_dsCTL ~                                          
    PA_dsSUP  (b2)    0.060    0.112    0.538    0.591

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCTL          0.779    0.118    6.585    0.000
   .s_LPLA_P_time     0.984    0.208    4.729    0.000
   .DEM_dsHT          1.744    0.283    6.170    0.000
   .PA_dsSUP          0.993    0.099   10.069    0.000

R-Square:
                   Estimate
    AL_dsCTL          0.378
    s_LPLA_P_time     0.125
    DEM_dsHT          0.018
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.035    0.063    0.556    0.578
    a2b2              0.005    0.015    0.306    0.760
    total             0.234    0.067    3.462    0.001
Code
lavaanPlot(model = m.DEM.PA.BD.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.97300681      0.95   satisfactory
2   AGFI 0.73006814      0.90           poor
3    NFI 0.90700036      0.90   satisfactory
4   NNFI 0.49157033      0.90           poor
5    CFI 0.91526172      0.90   satisfactory
6  RMSEA 0.21619232      0.05           poor
7   SRMR 0.08171611      0.08           poor
8    RFI 0.44200214      0.90           poor
9   PNFI 0.15116673      0.50           poor
10   IFI 0.92250402      0.90   satisfactory
Code
anova(m.DEM.UD.c3.fit, m.DEM.BD.c3.fit,m.PA.UD.c3.fit,m.PA.BD.c3.fit, m.DEM.PA.UD.c3.fit, m.DEM.PA.BD.c3.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan WARNING:
    Some restricted models fit better than less restricted models;
    either these models are not nested, or the less restricted model
    failed to reach a global optimum. Smallest difference =
    -0.266276183108956
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                   Df     AIC     BIC  Chisq Chisq diff RMSEA Df diff
m.DEM.UD.c3.fit     1  588.34  603.79 5.4760                         
m.PA.UD.c3.fit      1  534.77  550.22 5.4760    0.00000     0       0
m.DEM.PA.UD.c3.fit  1  866.91  887.50 5.4760    0.00000     0       0
m.DEM.PA.BD.c3.fit  1 1155.62 1178.80 5.5337    0.05768     0       0
m.DEM.BD.c3.fit     2  876.84  894.87 6.1813    0.64756     0       1
m.PA.BD.c3.fit      2  820.98  839.00 5.9150   -0.26628     0       0
                   Pr(>Chisq)
m.DEM.UD.c3.fit              
m.PA.UD.c3.fit               
m.DEM.PA.UD.c3.fit           
m.DEM.PA.BD.c3.fit           
m.DEM.BD.c3.fit         0.421
m.PA.BD.c3.fit               

4.6.2 Outcome measure: CM

Code
df.c3 <- df.1 %>% filter(cycle=="3")
m.DEM.UD.cm.c3 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.UD.cm.c3.fit <- sem(m.DEM.UD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.UD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                32.955
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.840
  Tucker-Lewis Index (TLI)                       0.199

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -253.911
  Loglikelihood unrestricted model (H1)       -251.173
                                                      
  Akaike (AIC)                                 519.822
  Bayesian (BIC)                               535.270
  Sample-size adjusted Bayesian (SABIC)        516.324

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.078

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.124    0.055    2.273    0.023
    PA_dsSUP   (d)    0.076    0.064    1.187    0.235
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.215    0.128   -1.680    0.093
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.187    0.060   -3.108    0.002

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.373    0.054    6.852    0.000
   .DEM_dsHT          1.725    0.279    6.192    0.000

R-Square:
                   Estimate
    AL_dsCM           0.210
    DEM_dsHT          0.029

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.040    0.029    1.399    0.162
    total             0.241    0.082    2.918    0.004
Code
lavaanPlot(model = m.DEM.UD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.UD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.94817641      0.95           poor
2   AGFI 0.48176410      0.90           poor
3    NFI 0.83383123      0.90           poor
4   NNFI 0.19941176      0.90           poor
5    CFI 0.83988235      0.90           poor
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.07783175      0.08   satisfactory
8    RFI 0.16915617      0.90           poor
9   PNFI 0.16676625      0.50           poor
10   IFI 0.85992554      0.90           poor
Code
m.DEM.BD.cm.c3 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * PA_dsSUP
           # mediator
             DEM_dsHT ~ a * s_LPLA_P_time
             AL_dsCM ~ b * DEM_dsHT
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.DEM.BD.cm.c3.fit <- sem(m.DEM.BD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.BD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 6.227
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.044

Model Test Baseline Model:

  Test statistic                                33.821
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.848
  Tucker-Lewis Index (TLI)                       0.544

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -397.183
  Loglikelihood unrestricted model (H1)       -394.070
                                                      
  Akaike (AIC)                                 808.366
  Bayesian (BIC)                               826.389
  Sample-size adjusted Bayesian (SABIC)        804.286

Root Mean Square Error of Approximation:

  RMSEA                                          0.148
  90 Percent confidence interval - lower         0.020
  90 Percent confidence interval - upper         0.286
  P-value H_0: RMSEA <= 0.050                    0.080
  P-value H_0: RMSEA >= 0.080                    0.857

Standardized Root Mean Square Residual:

  SRMR                                           0.089

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.094    0.039    2.390    0.017
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.094    0.039    2.390    0.017
  AL_dsCM ~                                           
    PA_dsSUP   (d)    0.079    0.064    1.242    0.214
  DEM_dsHT ~                                          
    s_LPLA_P_t (a)   -0.188    0.129   -1.463    0.143
  AL_dsCM ~                                           
    DEM_dsHT   (b)   -0.187    0.056   -3.315    0.001

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.374    0.056    6.718    0.000
   .s_LPLA_P_time     1.093    0.248    4.409    0.000
   .DEM_dsHT          1.725    0.283    6.104    0.000

R-Square:
                   Estimate
    AL_dsCM           0.204
    s_LPLA_P_time     0.028
    DEM_dsHT          0.029

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.035    0.027    1.303    0.193
    total             0.208    0.073    2.841    0.004
Code
lavaanPlot(model = m.DEM.BD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.BD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.96024178      0.95   satisfactory
2   AGFI 0.80120892      0.90           poor
3    NFI 0.81588498      0.90           poor
4   NNFI 0.54419983      0.90           poor
5    CFI 0.84806661      0.90           poor
6  RMSEA 0.14760750      0.05           poor
7   SRMR 0.08887802      0.08           poor
8    RFI 0.44765494      0.90           poor
9   PNFI 0.27196166      0.50           poor
10   IFI 0.86716540      0.90           poor
Code
m.PA.UD.cm.c3 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.UD.cm.c3.fit <- sem(m.PA.UD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.PA.UD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         6

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                30.927
  Degrees of freedom                                 5
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.827
  Tucker-Lewis Index (TLI)                       0.137

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -227.126
  Loglikelihood unrestricted model (H1)       -224.388
                                                      
  Akaike (AIC)                                 466.251
  Bayesian (BIC)                               481.700
  Sample-size adjusted Bayesian (SABIC)        462.754

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.078

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.124    0.055    2.242    0.025
    DEM_dsHT   (d)   -0.187    0.060   -3.135    0.002
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.089    0.093    0.958    0.338
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.076    0.063    1.196    0.232

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.373    0.055    6.848    0.000
   .PA_dsSUP          0.993    0.102    9.734    0.000

R-Square:
                   Estimate
    AL_dsCM           0.210
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.007    0.011    0.641    0.522
    total            -0.056    0.092   -0.605    0.545
Code
lavaanPlot(model = m.PA.UD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.UD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.94941909      0.95           poor
2   AGFI 0.49419085      0.90           poor
3    NFI 0.82293940      0.90           poor
4   NNFI 0.13681594      0.90           poor
5    CFI 0.82736319      0.90           poor
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.07783175      0.08   satisfactory
8    RFI 0.11469701      0.90           poor
9   PNFI 0.16458788      0.50           poor
10   IFI 0.85043731      0.90           poor
Code
m.PA.BD.cm.c3 <- ' # direct effect
            AL_dsCM ~ c * s_LPLA_P_time
            s_LPLA_P_time ~  c*AL_dsCM
            AL_dsCM ~ d * DEM_dsHT
           # mediator
             PA_dsSUP ~ a * s_LPLA_P_time
             AL_dsCM ~ b * PA_dsSUP
           # indirect effect (a*b)
             ab := a*b
           # total effect
             total := d + c + (a*b)
         '

m.PA.BD.cm.c3.fit <- sem(m.PA.BD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.PA.BD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 7.659
  Degrees of freedom                                 2
  P-value (Chi-square)                           0.022

Model Test Baseline Model:

  Test statistic                                33.821
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.797
  Tucker-Lewis Index (TLI)                       0.390

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -370.100
  Loglikelihood unrestricted model (H1)       -366.271
                                                      
  Akaike (AIC)                                 754.200
  Bayesian (BIC)                               772.223
  Sample-size adjusted Bayesian (SABIC)        750.120

Root Mean Square Error of Approximation:

  RMSEA                                          0.171
  90 Percent confidence interval - lower         0.056
  90 Percent confidence interval - upper         0.306
  P-value H_0: RMSEA <= 0.050                    0.044
  P-value H_0: RMSEA >= 0.080                    0.913

Standardized Root Mean Square Residual:

  SRMR                                           0.097

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_t (c)    0.099    0.038    2.617    0.009
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.099    0.038    2.617    0.009
  AL_dsCM ~                                           
    DEM_dsHT   (d)   -0.191    0.058   -3.316    0.001
  PA_dsSUP ~                                          
    s_LPLA_P_t (a)    0.082    0.095    0.868    0.385
  AL_dsCM ~                                           
    PA_dsSUP   (b)    0.074    0.066    1.115    0.265

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.374    0.055    6.812    0.000
   .s_LPLA_P_time     1.091    0.235    4.639    0.000
   .PA_dsSUP          0.993    0.102    9.744    0.000

R-Square:
                   Estimate
    AL_dsCM           0.197
    s_LPLA_P_time     0.025
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab                0.006    0.011    0.580    0.562
    total            -0.085    0.074   -1.154    0.248
Code
lavaanPlot(model = m.PA.BD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.PA.BD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.95249864      0.95   satisfactory
2   AGFI 0.76249319      0.90           poor
3    NFI 0.77354438      0.90           poor
4   NNFI 0.38978349      0.90           poor
5    CFI 0.79659450      0.90           poor
6  RMSEA 0.17079028      0.05           poor
7   SRMR 0.09709379      0.08           poor
8    RFI 0.32063315      0.90           poor
9   PNFI 0.25784813      0.50           poor
10   IFI 0.82216359      0.90           poor
Code
m.DEM.PA.UD.cm.c3 <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.UD.cm.c3.fit <- sem(m.DEM.PA.UD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.UD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 1 iteration

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                         8

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.476
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                33.821
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.839
  Tucker-Lewis Index (TLI)                       0.035

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -391.192
  Loglikelihood unrestricted model (H1)       -388.454
                                                      
  Akaike (AIC)                                 798.384
  Bayesian (BIC)                               818.982
  Sample-size adjusted Bayesian (SABIC)        793.721

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.069
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.078

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)    0.124    0.057    2.173    0.030
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.215    0.131   -1.641    0.101
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.187    0.057   -3.307    0.001
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.089    0.092    0.969    0.333
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.076    0.067    1.135    0.257

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.373    0.054    6.898    0.000
   .DEM_dsHT          1.725    0.279    6.174    0.000
   .PA_dsSUP          0.993    0.097   10.191    0.000

R-Square:
                   Estimate
    AL_dsCM           0.210
    DEM_dsHT          0.029
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.040    0.030    1.360    0.174
    a2b2              0.007    0.011    0.593    0.553
    total             0.171    0.058    2.946    0.003
Code
lavaanPlot(model = m.DEM.PA.UD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.UD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.96460666      0.95   satisfactory
2   AGFI 0.64606656      0.90           poor
3    NFI 0.83808607      0.90           poor
4   NNFI 0.03466652      0.90           poor
5    CFI 0.83911109      0.90           poor
6  RMSEA 0.21481265      0.05           poor
7   SRMR 0.07783175      0.08   satisfactory
8    RFI 0.02851644      0.90           poor
9   PNFI 0.13968101      0.50           poor
10   IFI 0.86362150      0.90           poor
Code
m.DEM.PA.BD.cm.c3 <- '# direct effect
                  AL_dsCM ~ c * s_LPLA_P_time
                  s_LPLA_P_time ~  c*AL_dsCM
                 # mediator
                   DEM_dsHT ~ a1 * s_LPLA_P_time
                   AL_dsCM ~ b1 * DEM_dsHT
                   PA_dsSUP ~ a2 * s_LPLA_P_time
                   AL_dsCM ~ b2 * PA_dsSUP
                 # indirect effect (a*b)
                   a1b1 := a1*b1
                   a2b2 := a2*b2
                 # total effect
                   total := c + (a1*b1) + (a2*b2)
             '
m.DEM.PA.BD.cm.c3.fit <- sem(m.DEM.PA.BD.cm.c3, data=df.c3, se = "bootstrap", bootstrap = 1000)

summary(m.DEM.PA.BD.cm.c3.fit, fit.measures=TRUE, rsquare=TRUE)
lavaan 0.6.16 ended normally after 11 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        10
  Number of equality constraints                     1

  Number of observations                            97

Model Test User Model:
                                                      
  Test statistic                                 5.483
  Degrees of freedom                                 1
  P-value (Chi-square)                           0.019

Model Test Baseline Model:

  Test statistic                                33.821
  Degrees of freedom                                 6
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.839
  Tucker-Lewis Index (TLI)                       0.033

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)               -534.525
  Loglikelihood unrestricted model (H1)       -531.784
                                                      
  Akaike (AIC)                                1087.051
  Bayesian (BIC)                              1110.223
  Sample-size adjusted Bayesian (SABIC)       1081.804

Root Mean Square Error of Approximation:

  RMSEA                                          0.215
  90 Percent confidence interval - lower         0.070
  90 Percent confidence interval - upper         0.405
  P-value H_0: RMSEA <= 0.050                    0.035
  P-value H_0: RMSEA >= 0.080                    0.939

Standardized Root Mean Square Residual:

  SRMR                                           0.078

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws             1000
  Number of successful bootstrap draws            1000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  AL_dsCM ~                                           
    s_LPLA_P_  (c)    0.093    0.041    2.285    0.022
  s_LPLA_P_time ~                                     
    AL_dsCM    (c)    0.093    0.041    2.285    0.022
  DEM_dsHT ~                                          
    s_LPLA_P_ (a1)   -0.188    0.128   -1.471    0.141
  AL_dsCM ~                                           
    DEM_dsHT  (b1)   -0.187    0.058   -3.210    0.001
  PA_dsSUP ~                                          
    s_LPLA_P_ (a2)    0.083    0.094    0.880    0.379
  AL_dsCM ~                                           
    PA_dsSUP  (b2)    0.076    0.066    1.155    0.248

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .AL_dsCM           0.374    0.055    6.756    0.000
   .s_LPLA_P_time     1.093    0.240    4.547    0.000
   .DEM_dsHT          1.725    0.269    6.409    0.000
   .PA_dsSUP          0.993    0.102    9.743    0.000

R-Square:
                   Estimate
    AL_dsCM           0.207
    s_LPLA_P_time     0.028
    DEM_dsHT          0.029
    PA_dsSUP          0.009

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    a1b1              0.035    0.028    1.275    0.202
    a2b2              0.006    0.011    0.567    0.571
    total             0.134    0.046    2.948    0.003
Code
lavaanPlot(model = m.DEM.PA.BD.cm.c3.fit, node_options = list(shape = "box", fontname = "Helvetica"), edge_options = list(color = "grey"), coefs = TRUE, sig = .05, stars="regress")
Code
interpret(m.DEM.PA.BD.cm.c3.fit)
    Name      Value Threshold Interpretation
1    GFI 0.97325566      0.95   satisfactory
2   AGFI 0.73255663      0.90           poor
3    NFI 0.83788896      0.90           poor
4   NNFI 0.03322875      0.90           poor
5    CFI 0.83887146      0.90           poor
6  RMSEA 0.21497257      0.05           poor
7   SRMR 0.07791088      0.08   satisfactory
8    RFI 0.02733373      0.90           poor
9   PNFI 0.13964816      0.50           poor
10   IFI 0.86341837      0.90           poor
Code
anova(m.DEM.UD.cm.c3.fit, m.DEM.BD.cm.c3.fit, m.PA.UD.cm.c3.fit, m.PA.BD.cm.c3.fit, m.DEM.PA.UD.cm.c3.fit, m.DEM.PA.BD.cm.c3.fit)
Warning in lavTestLRT(object = object, ..., model.names = NAMES): lavaan
WARNING: some models have the same degrees of freedom

Chi-Squared Difference Test

                      Df     AIC     BIC  Chisq Chisq diff RMSEA Df diff
m.DEM.UD.cm.c3.fit     1  519.82  535.27 5.4760                         
m.PA.UD.cm.c3.fit      1  466.25  481.70 5.4760    0.00000     0       0
m.DEM.PA.UD.cm.c3.fit  1  798.38  818.98 5.4760    0.00000     0       0
m.DEM.PA.BD.cm.c3.fit  1 1087.05 1110.22 5.4827    0.00667     0       0
m.DEM.BD.cm.c3.fit     2  808.37  826.39 6.2269    0.74419     0       1
m.PA.BD.cm.c3.fit      2  754.20  772.22 7.6588    1.43198     0       0
                      Pr(>Chisq)
m.DEM.UD.cm.c3.fit              
m.PA.UD.cm.c3.fit               
m.DEM.PA.UD.cm.c3.fit           
m.DEM.PA.BD.cm.c3.fit           
m.DEM.BD.cm.c3.fit        0.3883
m.PA.BD.cm.c3.fit               

4.7

4.7.1