Skip to contents
library(modsem)
#> This is modsem (1.0.11). Please report any bugs!

Reliablity-Corrected Single Items

If wanted, indicators for latent variables can be replaced with reliablity corrected single items, using Chronbach’s α\alpha. This can either be done using the relcorr_single_item function, returning the altered model syntax and data, or via the rcs argument in modsem. Here we can see an example using the relcorr_single_item function:

tpb_uk <- "
# Outer Model (Based on Hagger et al., 2007)
 ATT =~ att3 + att2 + att1 + att4
 SN =~ sn4 + sn2 + sn3 + sn1
 PBC =~ pbc2 + pbc1 + pbc3 + pbc4
 INT =~ int2 + int1 + int3 + int4
 BEH =~ beh3 + beh2 + beh1 + beh4

# Inner Model (Based on Steinmetz et al., 2011)
 INT ~ ATT + SN + PBC
 BEH ~ INT + PBC
 BEH ~ INT:PBC
"

corrected <- relcorr_single_item(syntax = tpb_uk, data = TPB_UK)
corrected
#> Average Variance Extracted:
#>   ATT:    0.773
#>   SN:     0.759
#>   PBC:    0.765
#>   INT:    0.790
#>   BEH:    0.769
#> 
#> Chronbach's Alpha:
#>   ATT:    0.941
#>   SN:     0.917
#>   PBC:    0.931
#>   INT:    0.984
#>   BEH:    0.942
#> 
#> Generated Syntax:
#>   INT ~ ATT
#>   INT ~ SN
#>   INT ~ PBC
#>   BEH ~ INT
#>   BEH ~ PBC
#>   BEH ~ INT:PBC
#>   ATT =~ 1*composite_ATT_
#>   SN =~ 1*composite_SN_
#>   PBC =~ 1*composite_PBC_
#>   INT =~ 1*composite_INT_
#>   BEH =~ 1*composite_BEH_
#>   composite_ATT_ ~~ 0.230703252252833*composite_ATT_
#>   composite_SN_ ~~ 0.219569422798239*composite_SN_
#>   composite_PBC_ ~~ 0.269459429965901*composite_PBC_
#>   composite_INT_ ~~ 0.0783705643995773*composite_INT_
#>   composite_BEH_ ~~ 0.276556964349188*composite_BEH_
#>   
#> Generated Items:
#>   'data.frame':  1169 obs. of  5 variables:
#>     $ composite_ATT_: num  5.5 5 2 5.5 4.5 1 1 1 4.25 6.25 ...
#>     $ composite_SN_ : num  6.5 4.75 3.5 6.5 5.25 3 2.25 4 4.5 6 ...
#>     $ composite_PBC_: num  4 4.5 1.75 5.75 5.5 1 1 1 5 5.75 ...
#>     $ composite_INT_: num  4 4.5 1 5.25 5.25 1 1 1 5 5 ...
#>     $ composite_BEH_: num  1 3.75 1.25 2.75 5.25 1 1 1 2.5 5.5 ...

Here we can see that relcorr_single_item returns a new model syntax, and a new data.frame containing the generated items. Additionally, it also returns the Chronbach’s α\alpha and average variance extraced (AVE) for the different constructs in the model. The syntax and data can be extracted using the $ operator, and used to estimate the model.

syntax <- corrected$syntax
data   <- corrected$data

est_dca <- modsem(syntax, data = data, method = "dblcent")
est_lms <- modsem(syntax, data = data, method="lms", nodes=32)
summary(est_lms)
#> Estimating baseline model (H0)
#> 
#> modsem (version 1.0.11):
#> 
#>   Estimator                                         LMS
#>   Optimization method                        EMA-NLMINB
#>   Number of observations                           1169
#>   Number of iterations                               49
#>   Loglikelihood                                -7276.79
#>   Akaike (AIC)                                 14591.57
#>   Bayesian (BIC)                               14687.79
#>  
#> Numerical Integration:
#>   Points of integration (per dim)                    32
#>   Dimensions                                          1
#>   Total points of integration                        32
#>  
#> Fit Measures for Baseline Model (H0):
#>   Loglikelihood                                   -9352
#>   Akaike (AIC)                                 18740.95
#>   Bayesian (BIC)                                18832.1
#>   Chi-square                                      34.76
#>   Degrees of Freedom (Chi-square)                     2
#>   P-value (Chi-square)                            0.000
#>   RMSEA                                           0.118
#>  
#> Comparative Fit to H0 (LRT test):
#>   Loglikelihood change                          2075.69
#>   Difference test (D)                           4151.38
#>   Degrees of freedom (D)                              1
#>   P-value (D)                                     0.000
#>  
#> R-Squared Interaction Model (H1):
#>   INT                                             0.865
#>   BEH                                             0.940
#> R-Squared Baseline Model (H0):
#>   INT                                             0.856
#>   BEH                                             0.869
#> R-Squared Change (H1 - H0):
#>   INT                                             0.009
#>   BEH                                             0.071
#> 
#> Parameter Estimates:
#>   Coefficients                           unstandardized
#>   Information                                  observed
#>   Standard errors                              standard
#>  
#> Latent Variables:
#>                   Estimate  Std.Error  z.value  P(>|z|)
#>   PBC =~ 
#>     cm_PBC_          1.000                             
#>   ATT =~ 
#>     cm_ATT_          1.000                             
#>   SN =~ 
#>     cmp_SN_          1.000                             
#>   INT =~ 
#>     cm_INT_          1.000                             
#>   BEH =~ 
#>     cm_BEH_          1.000                             
#> 
#> Regressions:
#>                   Estimate  Std.Error  z.value  P(>|z|)
#>   INT ~ 
#>     PBC              1.054      0.047   22.621    0.000
#>     ATT              0.000      0.043   -0.010    0.992
#>     SN               0.026      0.030    0.872    0.383
#>   BEH ~ 
#>     PBC              0.719      0.043   16.873    0.000
#>     INT              0.301      0.036    8.411    0.000
#>     PBC:INT          0.150      0.008   18.283    0.000
#> 
#> Intercepts:
#>                   Estimate  Std.Error  z.value  P(>|z|)
#>     cm_PBC_          3.956      0.031  128.922    0.000
#>     cm_ATT_          3.926      0.038  104.342    0.000
#>     cmp_SN_          4.466      0.038  117.695    0.000
#>     cm_INT_          3.851      0.038  100.236    0.000
#>     cm_BEH_          2.660      0.051   52.364    0.000
#>     INT              0.000                             
#>     BEH              0.000                             
#>     PBC              0.000                             
#>     ATT              0.000                             
#>     SN               0.000                             
#> 
#> Covariances:
#>                   Estimate  Std.Error  z.value  P(>|z|)
#>   PBC ~~ 
#>     ATT              3.516      0.091   38.798    0.000
#>     SN               2.296      0.086   26.584    0.000
#>   ATT ~~ 
#>     SN               2.187      0.091   24.061    0.000
#> 
#> Variances:
#>                   Estimate  Std.Error  z.value  P(>|z|)
#>     cm_PBC_          0.269                             
#>     cm_ATT_          0.231                             
#>     cmp_SN_          0.220                             
#>     cm_INT_          0.078                             
#>     cm_BEH_          0.277                             
#>     PBC              3.905      0.094   41.481    0.000
#>     ATT              3.916      0.127   30.792    0.000
#>     SN               2.527      0.104   24.217    0.000
#>     INT              0.695      0.043   16.046    0.000
#>     BEH              0.328      0.032   10.349    0.000

Alternatively, it is possible to use the rcs argument in the modsem function to call relcorr_single_item before estimating the model.

est_dca <- modsem(tpb_uk, data = TPB_UK, method = "dblcent", rcs = TRUE)
est_lms <- modsem(tpb_uk, data = TPB_UK, method = "lms", rcs = TRUE)
#> Warning: It is recommended that you have at least 32 nodes for interaction
#> effects between exogenous and endogenous variables in the lms approach 'nodes =
#> 24'

Choosing Variables

If you don’t want to use reliablity-corrected single items for all of the latent variables in the model, you can use the choose argument in relcorr_single_item (orrcs.choose in modsem) to select which set of indicators to replace.

relcorr_single_item(syntax = tpb_uk, data = TPB_UK, 
                    choose = c("ATT", "SN", "PBC", "INT"))
#> Average Variance Extracted:
#>   ATT:    0.773
#>   SN:     0.759
#>   PBC:    0.764
#>   INT:    0.790
#> 
#> Chronbach's Alpha:
#>   ATT:    0.941
#>   SN:     0.917
#>   PBC:    0.931
#>   INT:    0.984
#> 
#> Generated Syntax:
#>   INT ~ ATT
#>   INT ~ SN
#>   INT ~ PBC
#>   BEH ~ INT
#>   BEH ~ PBC
#>   BEH ~ INT:PBC
#>   BEH =~ beh3
#>   BEH =~ beh2
#>   BEH =~ beh1
#>   BEH =~ beh4
#>   ATT =~ 1*composite_ATT_
#>   SN =~ 1*composite_SN_
#>   PBC =~ 1*composite_PBC_
#>   INT =~ 1*composite_INT_
#>   composite_ATT_ ~~ 0.230703252252833*composite_ATT_
#>   composite_SN_ ~~ 0.219569422798239*composite_SN_
#>   composite_PBC_ ~~ 0.269459429965901*composite_PBC_
#>   composite_INT_ ~~ 0.0783705643995773*composite_INT_
#>   
#> Generated Items:
#>   'data.frame':  1169 obs. of  4 variables:
#>     $ composite_ATT_: num  5.5 5 2 5.5 4.5 1 1 1 4.25 6.25 ...
#>     $ composite_SN_ : num  6.5 4.75 3.5 6.5 5.25 3 2.25 4 4.5 6 ...
#>     $ composite_PBC_: num  4 4.5 1.75 5.75 5.5 1 1 1 5 5.75 ...
#>     $ composite_INT_: num  4 4.5 1 5.25 5.25 1 1 1 5 5 ...

est_dca <- modsem(tpb_uk, data = TPB_UK, method = "dblcent", rcs = TRUE,
                  rcs.choose = c("ATT", "SN", "PBC", "INT"))
summary(est_dca)
#> modsem (version 1.0.11, approach = dblcent):
#> 
#> Interaction Model Fit Measures (H1):
#>   Loglikelihood                              -18110.30 
#>   Akaike (AIC)                                36270.60 
#>   Bayesian (BIC)                              36397.20 
#>   Chi-square                                   1328.25 
#>   Degrees of Freedom                                20 
#>   P-value (Chi-square)                           0.000 
#>   RMSEA                                          0.237 
#> 
#> Fit Measures for Baseline Model (H0):
#>   Loglikelihood                              -18232.48 
#>   Akaike (AIC)                                36512.97 
#>   Bayesian (BIC)                              36634.50 
#>   Chi-square                                   1572.62 
#>   Degrees of Freedom                                21 
#>   P-value (Chi-square)                           0.000 
#>   RMSEA                                          0.251 
#> 
#> Comparative Fit to H0 (LRT test):
#>   Chi-square diff                              244.368 
#>   Degrees of freedom diff                            1 
#>   P-value (LRT)                                  0.000 
#> 
#> R-Squared Interaction Model (H1):
#>   BEH                                            0.908 
#>   INT                                            0.858 
#> R-Squared Baseline Model (H0):
#>   BEH                                            0.874 
#>   INT                                            0.859 
#> R-Squared Change (H1 - H0):
#>   BEH                                            0.034 
#>   INT                                           -0.001 
#> 
#> lavaan 0.6-19 ended normally after 61 iterations
#> 
#>   Estimator                                         ML
#>   Optimization method                           NLMINB
#>   Number of model parameters                        25
#> 
#>   Number of observations                          1169
#> 
#> Model Test User Model:
#>                                                       
#>   Test statistic                              1328.248
#>   Degrees of freedom                                20
#>   P-value (Chi-square)                           0.000
#> 
#> Parameter Estimates:
#> 
#>   Standard errors                             Standard
#>   Information                                 Expected
#>   Information saturated (h1) model          Structured
#> 
#> Latent Variables:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   BEH =~                                              
#>     beh3              1.000                           
#>     beh2              0.986    0.013   74.469    0.000
#>     beh1              0.822    0.019   43.579    0.000
#>     beh4              0.811    0.019   42.331    0.000
#>   ATT =~                                              
#>     composite_ATT_    1.000                           
#>   SN =~                                               
#>     composite_SN_     1.000                           
#>   PBC =~                                              
#>     composite_PBC_    1.000                           
#>   INT =~                                              
#>     composite_INT_    1.000                           
#>   INTPBC =~                                           
#>     cmps_INT__PBC_    1.000                           
#> 
#> Regressions:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   INT ~                                               
#>     ATT               0.002    0.045    0.034    0.973
#>     SN               -0.009    0.032   -0.288    0.773
#>     PBC               1.075    0.050   21.585    0.000
#>   BEH ~                                               
#>     INT               0.649    0.038   17.092    0.000
#>     PBC               0.386    0.044    8.709    0.000
#>     INTPBC            0.125    0.008   16.583    0.000
#> 
#> Covariances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   ATT ~~                                              
#>     SN                2.028    0.111   18.255    0.000
#>     PBC               3.242    0.148   21.897    0.000
#>     INTPBC            0.250    0.199    1.254    0.210
#>   SN ~~                                               
#>     PBC               2.147    0.113   19.065    0.000
#>     INTPBC           -0.142    0.164   -0.864    0.387
#>   PBC ~~                                              
#>     INTPBC            0.401    0.197    2.041    0.041
#> 
#> Variances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>    .composite_ATT_    0.231                           
#>    .composite_SN_     0.220                           
#>    .composite_PBC_    0.269                           
#>    .composite_INT_    0.078                           
#>    .beh3              0.481    0.031   15.616    0.000
#>    .beh2              0.535    0.032   16.684    0.000
#>    .beh1              1.784    0.079   22.695    0.000
#>    .beh4              1.863    0.082   22.795    0.000
#>    .cmps_INT__PBC_    0.000                           
#>    .BEH               0.488    0.033   14.625    0.000
#>     ATT               3.673    0.161   22.748    0.000
#>     SN                2.423    0.109   22.168    0.000
#>     PBC               3.604    0.160   22.496    0.000
#>    .INT               0.686    0.044   15.440    0.000
#>     INTPBC           11.858    0.490   24.176    0.000