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

Composite Constructs

As of version 1.0.20, the modsem function supports the estimation of models with composite constructs, when using method="lms". The approach is based on Tamara Schamberger, Florian Schuberth, Jörg Henseler & Yves Rosseel, 2015. Depending on your lavaan version (>=0.6-20), composite constructs can also be used with the product indicator approaches (e.g., method="dblcent").

Here we can see a simple example, using the LMS approach with the TPB dataset.

tpb <- '
# Outer Model (Based on Hagger et al., 2007)
  # Latent Variables
  SN =~ sn1 + sn2
  PBC =~ pbc1 + pbc2 + pbc3
  INT =~ int1 + int2 + int3

  # Composites
  ATT <~ att1 + att2 + att3 + att4 + att5
  BEH <~ b1 + b2

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

fit <- modsem(tpb, TPB, method = "lms", nodes = 32)
summary(fit)
#> 
#> modsem (1.0.21) ended normally after 55 iterations
#> 
#>   Estimator                                        LMS
#>   Optimization method                       EMA-NLMINB
#>   Number of model parameters                        47
#> 
#>   Number of observations                          2000
#> 
#> Loglikelihood and Information Criteria:
#>   Loglikelihood                              -26324.50
#>   Akaike (AIC)                                52743.00
#>   Bayesian (BIC)                              53006.24
#>  
#> Numerical Integration:
#>   Points of integration (per dim)                   32
#>   Dimensions                                         1
#>   Total points of integration                       32
#> 
#> Fit Measures for Baseline Model (H0):
#>                                               Standard
#>   Chi-square                                     63.05
#>   Degrees of Freedom (Chi-square)                   71
#>   P-value (Chi-square)                           0.738
#>   RMSEA                                          0.000
#>                                                       
#>   Loglikelihood                              -26391.61
#>   Akaike (AIC)                                52875.22
#>   Bayesian (BIC)                              53132.86
#>  
#> Comparative Fit to H0 (LRT test):
#>   Loglikelihood change                           67.11
#>   Difference test (D)                           134.22
#>   Degrees of freedom (D)                             1
#>   P-value (D)                                    0.000
#>  
#> R-Squared Interaction Model (H1):
#>   INT                                            0.364
#>   BEH                                            0.232
#> R-Squared Baseline Model (H0):
#>   INT                                            0.364
#>   BEH                                            0.186
#> R-Squared Change (H1 - H0):
#>   INT                                            0.000
#>   BEH                                            0.045
#> 
#> Parameter Estimates:
#>   Coefficients                          unstandardized
#>   Information                                 observed
#>   Standard errors                             standard
#>  
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   SN =~         
#>     sn1             1.000                             
#>     sn2             0.888      0.017   52.443    0.000
#>   PBC =~        
#>     pbc1            1.000                             
#>     pbc2            0.912      0.013   69.244    0.000
#>     pbc3            0.801      0.012   65.954    0.000
#>   INT =~        
#>     int1            1.000                             
#>     int2            0.913      0.015   58.972    0.000
#>     int3            0.807      0.014   55.676    0.000
#> 
#> Composites:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   ATT <~        
#>     att1            1.000                             
#>     att2            0.675      0.289    2.333    0.020
#>     att3            0.867      0.312    2.777    0.005
#>     att4            0.836      0.302    2.767    0.006
#>     att5            1.119      0.358    3.121    0.002
#>   BEH <~        
#>     b1              1.000                             
#>     b2              1.484      0.442    3.358    0.001
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   INT ~         
#>     SN              0.182      0.027    6.611    0.000
#>     PBC             0.226      0.029    7.765    0.000
#>     ATT             0.051      0.013    4.050    0.000
#>   BEH ~         
#>     PBC             0.563      0.111    5.090    0.000
#>     INT             0.461      0.103    4.483    0.000
#>     INT:PBC         0.496      0.096    5.186    0.000
#> 
#> Intercepts:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .pbc1            0.998      0.024   42.419    0.000
#>    .pbc2            0.985      0.022   44.938    0.000
#>    .pbc3            0.991      0.020   50.460    0.000
#>    .sn1             1.005      0.024   41.656    0.000
#>    .sn2             1.010      0.022   46.707    0.000
#>     att1            1.014      0.024   42.011    0.000
#>     att2            1.007      0.021   46.971    0.000
#>     att3            1.016      0.020   51.460    0.000
#>     att4            0.999      0.018   55.659    0.000
#>     att5            0.992      0.022   45.677    0.000
#>    .int1            1.014      0.022   46.958    0.000
#>    .int2            1.012      0.020   50.399    0.000
#>    .int3            1.005      0.018   54.799    0.000
#>     b1              1.002      0.021   46.959    0.000
#>     b2              1.019      0.020   51.011    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   att2 ~~       
#>     att1            0.878                             
#>   att3 ~~       
#>     att1            0.788                             
#>     att2            0.692                             
#>   att4 ~~       
#>     att1            0.693                             
#>     att2            0.609                             
#>     att3            0.547                             
#>   att5 ~~       
#>     att1            0.885                             
#>     att2            0.778                             
#>     att3            0.698                             
#>     att4            0.616                             
#>   b2 ~~         
#>     b1              0.605                             
#>   SN ~~         
#>     ATT             2.424      0.526    4.609    0.000
#>   PBC ~~        
#>     SN              0.677      0.029   23.337    0.000
#>     ATT             2.610      0.565    4.616    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .pbc1            0.144      0.008   18.084    0.000
#>    .pbc2            0.160      0.008   21.189    0.000
#>    .pbc3            0.155      0.007   23.672    0.000
#>    .sn1             0.178      0.015   12.013    0.000
#>    .sn2             0.157      0.012   13.192    0.000
#>     att1            1.166                             
#>     att2            0.920                             
#>     att3            0.781                             
#>     att4            0.645                             
#>     att5            0.944                             
#>    .int1            0.157      0.009   18.033    0.000
#>    .int2            0.160      0.008   20.330    0.000
#>    .int3            0.168      0.007   23.465    0.000
#>     b1              0.815                             
#>     b2              0.716                             
#>     SN              0.987      0.039   25.382    0.000
#>     PBC             0.962      0.035   27.253    0.000
#>     ATT            15.445      6.597    2.341    0.019
#>    .INT             0.493      0.020   24.659    0.000
#>    .BEH             3.166      1.124    2.816    0.005