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 67 iterations
#> 
#>   Estimator                                        LMS
#>   Optimization method                       EMA-NLMINB
#>   Number of model parameters                        47
#> 
#>   Number of observations                          2000
#> 
#> Loglikelihood and Information Criteria:
#>   Loglikelihood                              -26324.39
#>   Akaike (AIC)                                52742.78
#>   Bayesian (BIC)                              53006.02
#>  
#> 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.22
#>   Difference test (D)                           134.44
#>   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.046
#> 
#> 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.434    0.000
#>   PBC =~        
#>     pbc1            1.000                             
#>     pbc2            0.912      0.013   69.250    0.000
#>     pbc3            0.801      0.012   65.957    0.000
#>   INT =~        
#>     int1            1.000                             
#>     int2            0.913      0.015   58.975    0.000
#>     int3            0.807      0.014   55.678    0.000
#> 
#> Composites:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   ATT <~        
#>     att1            1.000                             
#>     att2            0.674      0.289    2.329    0.020
#>     att3            0.872      0.314    2.773    0.006
#>     att4            0.840      0.304    2.763    0.006
#>     att5            1.119      0.359    3.115    0.002
#>   BEH <~        
#>     b1              1.000                             
#>     b2              1.355      0.352    3.848    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   INT ~         
#>     SN              0.182      0.027    6.611    0.000
#>     PBC             0.226      0.029    7.766    0.000
#>     ATT             0.051      0.013    4.038    0.000
#>   BEH ~         
#>     PBC             0.535      0.092    5.795    0.000
#>     INT             0.436      0.087    4.990    0.000
#>     INT:PBC         0.471      0.079    5.940    0.000
#> 
#> Intercepts:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .pbc1            0.997      0.024   42.396    0.000
#>    .pbc2            0.985      0.022   44.917    0.000
#>    .pbc3            0.991      0.020   50.438    0.000
#>    .sn1             1.005      0.024   41.645    0.000
#>    .sn2             1.010      0.022   46.693    0.000
#>     att1            1.014      0.024   41.986    0.000
#>     att2            1.007      0.021   46.946    0.000
#>     att3            1.016      0.020   51.433    0.000
#>     att4            0.999      0.018   55.631    0.000
#>     att5            0.992      0.022   45.651    0.000
#>    .int1            1.014      0.022   46.943    0.000
#>    .int2            1.012      0.020   50.385    0.000
#>    .int3            1.005      0.018   54.786    0.000
#>     b1              1.001      0.021   47.006    0.000
#>     b2              1.019      0.020   51.074    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.431      0.530    4.588    0.000
#>   PBC ~~        
#>     SN              0.678      0.029   23.331    0.000
#>     ATT             2.620      0.571    4.590    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .pbc1            0.144      0.008   18.090    0.000
#>    .pbc2            0.160      0.008   21.192    0.000
#>    .pbc3            0.155      0.007   23.675    0.000
#>    .sn1             0.178      0.015   12.011    0.000
#>    .sn2             0.157      0.012   13.189    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.331    0.000
#>    .int3            0.168      0.007   23.465    0.000
#>     b1              0.815                             
#>     b2              0.716                             
#>     SN              0.988      0.039   25.373    0.000
#>     PBC             0.963      0.035   27.239    0.000
#>     ATT            15.508      6.651    2.332    0.020
#>    .INT             0.493      0.020   24.660    0.000
#>    .BEH             2.845      0.844    3.372    0.001