6.4 In-Class Exercises

In these exercises, you will use full structural equation modeling (SEM) to evaluate the Theory of Reasoned Action (TORA), which is a popular psychological theory of social behavior developed by Ajzen and Fishbein. The theory states that actual behavior is predicted by behavioral intention, which is in turn predicted by the attitude toward the behavior and subjective norms about the behavior. Later, a third determinant was added, perceived behavioral control. The extent to which people feel that they have control over their behavior also influences their behavior.


The data we will use for this practical are available in the toradata.csv file. These data were synthesized according to the results of Reinecke (1998)’s investigation of condom use by young people between 16 and 24 years old.

The data contain the following variables:

  • respnr: Numeric participant ID
  • behavior: The dependent variable condom use
    • Measured on a 5-point frequency scale (How often do you…)
  • intent: A single item assessing behavioral intention
    • Measured on a similar 5-point scale (In general, do you intend to…).
  • attit_1:attit_3: Three indicators of attitudes about condom use
    • Measured on a 5-point rating scale (e.g., using a condom is awkward)
  • norm_1:norm_3: Three indicators of social norms about condom use
    • Measured on a 5-point rating scale (e.g., I think most of my friends would use…)
  • control_1:control_3: Three indicators of perceived behavioral control
    • Measured on a 5-point rating scale (e.g., I know well how to use a condom)
  • sex: Binary factor indicating biological sex

6.4.1

Load the data contained in the toradata.csv file.

Click to show code
condom <- read.csv("toradata.csv", stringsAsFactors = TRUE)

6.4.2

The data contain multiple indicators of attitudes, norms, and control. Run a CFA for these three latent variables.

  • Correlate the latent factors.
  • Do the data support the measurement model for these latent factors?
  • Are the three latent factors significantly correlated?
  • Is it reasonable to proceed with our evaluation of the TORA theory?
Click to show code
library(lavaan)

mod_cfa <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
'

fit <- cfa(mod_cfa, data = condom)

summary(fit, fit.measures = TRUE)
## lavaan 0.6-18 ended normally after 29 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        21
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                35.611
##   Degrees of freedom                                24
##   P-value (Chi-square)                           0.060
## 
## Model Test Baseline Model:
## 
##   Test statistic                               910.621
##   Degrees of freedom                                36
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.987
##   Tucker-Lewis Index (TLI)                       0.980
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -2998.290
##   Loglikelihood unrestricted model (H1)      -2980.484
##                                                       
##   Akaike (AIC)                                6038.580
##   Bayesian (BIC)                              6112.530
##   Sample-size adjusted Bayesian (SABIC)       6045.959
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.044
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.073
##   P-value H_0: RMSEA <= 0.050                    0.599
##   P-value H_0: RMSEA >= 0.080                    0.017
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.037
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes =~                                        
##     attit_1           1.000                           
##     attit_2           1.036    0.068   15.308    0.000
##     attit_3          -1.002    0.067  -14.856    0.000
##   norms =~                                            
##     norm_1            1.000                           
##     norm_2            1.031    0.098   10.574    0.000
##     norm_3            0.932    0.093   10.013    0.000
##   control =~                                          
##     control_1         1.000                           
##     control_2         0.862    0.129    6.699    0.000
##     control_3         0.968    0.133    7.290    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes ~~                                        
##     norms             0.340    0.069    4.957    0.000
##     control           0.475    0.073    6.468    0.000
##   norms ~~                                            
##     control           0.338    0.064    5.254    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .attit_1           0.418    0.052    8.047    0.000
##    .attit_2           0.310    0.047    6.633    0.000
##    .attit_3           0.369    0.049    7.577    0.000
##    .norm_1            0.504    0.071    7.130    0.000
##    .norm_2            0.469    0.071    6.591    0.000
##    .norm_3            0.635    0.075    8.465    0.000
##    .control_1         0.614    0.078    7.905    0.000
##    .control_2         0.865    0.091    9.520    0.000
##    .control_3         0.762    0.087    8.758    0.000
##     attitudes         0.885    0.116    7.620    0.000
##     norms             0.743    0.116    6.423    0.000
##     control           0.497    0.099    5.002    0.000
Click for explanation
  • Yes, the model fits the data well, and the measurement parameters (e.g., factor loadings, residual variances) look reasonable. So, the data seem to support this measurement structure.
  • Yes, all three latent variables are significantly, positively correlated.
  • Yes.
    • The measurement structure is supported, so we can use the latent variables to represent the respective constructs in our subsequent SEM.
    • The TORA doesn’t actually say anything about the associations between these three factors, but it makes sense that they would be positively associated. So, we should find this result comforting.

6.4.3

Estimate the basic TORA model as an SEM.

  • Predict intention from attitudes and norms.
  • Predict condom use from intention.
  • Use the latent versions of attitudes and norms.
  • Covary the attitudes and norms factors.
  • Does the model fit well?
  • Do the estimates align with the TORA?
  • How much variance in intention and condom use are explained by the model?
Click to show code
mod <- '
## Define the latent variables:
attitudes =~ attit_1 + attit_2 + attit_3
norms     =~ norm_1  + norm_2  + norm_3

## Define the structural model:         
intent   ~ attitudes + norms
behavior ~ intent
'

fit <- sem(mod, data = condom)

summary(fit, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-18 ended normally after 24 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        18
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                27.890
##   Degrees of freedom                                18
##   P-value (Chi-square)                           0.064
## 
## Model Test Baseline Model:
## 
##   Test statistic                              1089.407
##   Degrees of freedom                                28
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.991
##   Tucker-Lewis Index (TLI)                       0.986
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -2533.616
##   Loglikelihood unrestricted model (H1)      -2519.671
##                                                       
##   Akaike (AIC)                                5103.232
##   Bayesian (BIC)                              5166.618
##   Sample-size adjusted Bayesian (SABIC)       5109.557
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.047
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.079
##   P-value H_0: RMSEA <= 0.050                    0.523
##   P-value H_0: RMSEA >= 0.080                    0.046
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.036
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes =~                                        
##     attit_1           1.000                           
##     attit_2           1.039    0.068   15.365    0.000
##     attit_3          -1.002    0.067  -14.850    0.000
##   norms =~                                            
##     norm_1            1.000                           
##     norm_2            0.983    0.087   11.333    0.000
##     norm_3            0.935    0.087   10.778    0.000
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   intent ~                                            
##     attitudes         0.439    0.063    6.990    0.000
##     norms             0.693    0.077    8.977    0.000
##   behavior ~                                          
##     intent            0.746    0.045   16.443    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes ~~                                        
##     norms             0.347    0.069    5.027    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .attit_1           0.420    0.052    8.103    0.000
##    .attit_2           0.306    0.046    6.604    0.000
##    .attit_3           0.372    0.049    7.651    0.000
##    .norm_1            0.483    0.064    7.581    0.000
##    .norm_2            0.521    0.065    7.954    0.000
##    .norm_3            0.610    0.070    8.713    0.000
##    .intent            0.423    0.048    8.769    0.000
##    .behavior          0.603    0.054   11.180    0.000
##     attitudes         0.884    0.116    7.614    0.000
##     norms             0.765    0.113    6.767    0.000
## 
## R-Square:
##                    Estimate
##     attit_1           0.678
##     attit_2           0.757
##     attit_3           0.705
##     norm_1            0.613
##     norm_2            0.587
##     norm_3            0.523
##     intent            0.639
##     behavior          0.520
Click for explanation
  • Yes, the model still fits the data very well.

  • Yes, the estimates all align with the TORA. Specifically, attitudes and norms both significantly predict intention, and intention significantly predicts condom use.

  • The model explains 63.93% of the variance in intention and 51.96% of the variance in condom use.


6.4.4

Update your model to represent the extended TORA model that includes perceived behavioral control.

  • Regress condom use onto perceived behavioral control.
  • Use the latent variable representation of control.
  • Covary all three exogenous latent factors.
  • Does the model fit well?
  • Do the estimates align with the updated TORA?
  • How much variance in intention and condom use are explained by the model?
Click to show code
mod_tora <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
             
intent   ~ attitudes + norms
behavior ~ intent + control
'

fit_tora <- sem(mod_tora, data = condom)

summary(fit_tora, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-18 ended normally after 31 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        27
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                48.757
##   Degrees of freedom                                39
##   P-value (Chi-square)                           0.136
## 
## Model Test Baseline Model:
## 
##   Test statistic                              1333.695
##   Degrees of freedom                                55
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.992
##   Tucker-Lewis Index (TLI)                       0.989
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -3551.160
##   Loglikelihood unrestricted model (H1)      -3526.782
##                                                       
##   Akaike (AIC)                                7156.320
##   Bayesian (BIC)                              7251.400
##   Sample-size adjusted Bayesian (SABIC)       7165.807
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.032
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.057
##   P-value H_0: RMSEA <= 0.050                    0.870
##   P-value H_0: RMSEA >= 0.080                    0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.033
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes =~                                        
##     attit_1           1.000                           
##     attit_2           1.033    0.068   15.221    0.000
##     attit_3          -1.025    0.068  -15.097    0.000
##   norms =~                                            
##     norm_1            1.000                           
##     norm_2            0.984    0.087   11.256    0.000
##     norm_3            0.955    0.088   10.881    0.000
##   control =~                                          
##     control_1         1.000                           
##     control_2         0.859    0.127    6.789    0.000
##     control_3         0.997    0.131    7.609    0.000
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   intent ~                                            
##     attitudes         0.447    0.063    7.100    0.000
##     norms             0.706    0.078    9.078    0.000
##   behavior ~                                          
##     intent            0.563    0.063    8.923    0.000
##     control           0.454    0.119    3.805    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes ~~                                        
##     norms             0.342    0.068    5.011    0.000
##     control           0.474    0.072    6.548    0.000
##   norms ~~                                            
##     control           0.352    0.064    5.521    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .attit_1           0.432    0.052    8.381    0.000
##    .attit_2           0.330    0.046    7.220    0.000
##    .attit_3           0.344    0.046    7.439    0.000
##    .norm_1            0.496    0.063    7.820    0.000
##    .norm_2            0.533    0.065    8.152    0.000
##    .norm_3            0.595    0.069    8.643    0.000
##    .control_1         0.625    0.075    8.372    0.000
##    .control_2         0.876    0.090    9.757    0.000
##    .control_3         0.746    0.084    8.874    0.000
##    .intent            0.409    0.047    8.769    0.000
##    .behavior          0.542    0.052   10.423    0.000
##     attitudes         0.872    0.115    7.566    0.000
##     norms             0.751    0.112    6.709    0.000
##     control           0.485    0.096    5.059    0.000
## 
## R-Square:
##                    Estimate
##     attit_1           0.668
##     attit_2           0.738
##     attit_3           0.727
##     norm_1            0.602
##     norm_2            0.577
##     norm_3            0.535
##     control_1         0.437
##     control_2         0.290
##     control_3         0.392
##     intent            0.651
##     behavior          0.566
Click for explanation
  • Yes, the model still fits the data very well.

  • Yes, the estimates all align with the updated TORA. Specifically, attitudes and norms both significantly predict intention, while intention and control both significantly predict condom use.

  • The model explains 65.11% of the variance in intention and 56.62% of the variance in condom use.


The TORA model explicitly forbids direct paths from attitudes and norms to behaviors; these effects should be fully mediated by the behavioral intention. The theory does not specify how perceived behavioral control should affect behaviors. There may be a direct effect of control on behavior, or the effect may be (partially) mediated by intention.


6.4.5

Evaluate the hypothesized indirect effects of attitudes and norms.

  • Include attitudes, norms, and control in your model as in 6.4.4.
  • Does intention significantly mediate the effects of attitudes and norms on behavior?
    • Don’t forget to follow all the steps we covered for testing mediation.
  • Are both of the above effects completely mediated?
  • Do these results comport with the TORA? Why or why not?
Click for explanation
mod <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
             
intent   ~ a1 * attitudes + a2 * norms
behavior ~ b * intent + control + attitudes + norms

ie_att  := a1 * b
ie_norm := a2 * b
'

set.seed(235711)

fit <- sem(mod, data = condom, se = "bootstrap", bootstrap = 1000)

summary(fit, ci = TRUE)
## lavaan 0.6-18 ended normally after 36 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        29
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                48.629
##   Degrees of freedom                                37
##   P-value (Chi-square)                           0.096
## 
## Parameter Estimates:
## 
##   Standard errors                            Bootstrap
##   Number of requested bootstrap draws             1000
##   Number of successful bootstrap draws            1000
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   attitudes =~                                                          
##     attit_1           1.000                               1.000    1.000
##     attit_2           1.033    0.060   17.261    0.000    0.925    1.165
##     attit_3          -1.025    0.064  -15.894    0.000   -1.163   -0.902
##   norms =~                                                              
##     norm_1            1.000                               1.000    1.000
##     norm_2            0.984    0.071   13.794    0.000    0.843    1.127
##     norm_3            0.955    0.093   10.324    0.000    0.792    1.157
##   control =~                                                            
##     control_1         1.000                               1.000    1.000
##     control_2         0.860    0.113    7.624    0.000    0.653    1.098
##     control_3         0.996    0.147    6.790    0.000    0.748    1.320
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   intent ~                                                              
##     attitudes (a1)    0.447    0.067    6.674    0.000    0.324    0.585
##     norms     (a2)    0.706    0.078    9.094    0.000    0.569    0.878
##   behavior ~                                                            
##     intent     (b)    0.545    0.075    7.282    0.000    0.389    0.686
##     control           0.428    0.232    1.847    0.065    0.046    0.934
##     attitudes         0.010    0.122    0.084    0.933   -0.249    0.226
##     norms             0.041    0.118    0.345    0.730   -0.194    0.266
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   attitudes ~~                                                          
##     norms             0.342    0.070    4.883    0.000    0.208    0.480
##     control           0.475    0.069    6.850    0.000    0.344    0.612
##   norms ~~                                                              
##     control           0.350    0.067    5.218    0.000    0.221    0.484
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .attit_1           0.432    0.050    8.720    0.000    0.331    0.526
##    .attit_2           0.330    0.045    7.382    0.000    0.238    0.415
##    .attit_3           0.343    0.049    6.992    0.000    0.244    0.444
##    .norm_1            0.496    0.060    8.305    0.000    0.376    0.614
##    .norm_2            0.533    0.077    6.951    0.000    0.390    0.687
##    .norm_3            0.594    0.069    8.597    0.000    0.443    0.719
##    .control_1         0.624    0.076    8.216    0.000    0.477    0.763
##    .control_2         0.875    0.092    9.495    0.000    0.686    1.052
##    .control_3         0.745    0.079    9.398    0.000    0.574    0.889
##    .intent            0.409    0.050    8.169    0.000    0.309    0.507
##    .behavior          0.544    0.058    9.379    0.000    0.415    0.639
##     attitudes         0.872    0.104    8.387    0.000    0.675    1.077
##     norms             0.751    0.099    7.557    0.000    0.556    0.941
##     control           0.486    0.096    5.042    0.000    0.303    0.684
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     ie_att            0.244    0.050    4.860    0.000    0.150    0.352
##     ie_norm           0.385    0.066    5.835    0.000    0.268    0.527
  • Yes, both indirect effects are significant according to the 95% bootstrapped CIs.
  • Yes, both effects are completely moderated by behavioral intention. We can infer as much because the direct effects of attitudes and norms on condom use are both nonsignificant.
  • Yes, these results comport with the TORA. Both effects are fully mediated, as the theory stipulates.

In addition to evaluating the significance of the indirect and direct effects, we can also take a model-comparison perspective. We can use model comparisons to test if removing the direct effects of attitudes and norms on condom use significantly decreases model fit. In other words, are those paths needed to accurately represent the data, or are they “dead weight”.


6.4.6

Use a \(\Delta \chi^2\) test to evaluate the necessity of including the direct effects of attitudes and norms on condom use in the model.

  • What is your conclusion?
Click for explanation

We only need to compare the fit of the model with the direct effects included to the fit of the model without the direct effects. We’ve already estimated both models, so we can simply submit the fitted lavaan objects to the anova() function.

anova(fit, fit_tora)

The \(\Delta \chi^2\) test is not significant. So, we have not lost a significant amount of fit by fixing the direct effects to zero. In other words, the complete mediation model explains the data just as well as the partial mediation model. So, we should probably prefer the more parsimonious model.


6.4.7

Use some statistical means of evaluating the most plausible way to include perceived behavioral control into the model.

  • Choose between the following three options:
    1. control predicts behavior via a direct, un-mediated effect.
    2. control predicts behavior via an indirect effect that is completely mediated by intention.
    3. control predicts behavior via both an indirect effect through intention and a residual direct effect.

Hint: There is more than one way to approach this problem.


Approach 1: Testing Effects

Click to show code

One way to tackle this problem is to test the indirect, direct, and total effects.

## Allow for partial mediation:
mod1 <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
             
intent   ~ attitudes + norms + a * control
behavior ~ b * intent + c * control

ie    := a * b
total := ie + c
'

set.seed(235711)

fit1 <- sem(mod1, data = condom, se = "bootstrap", bootstrap = 1000)
summary(fit1, ci = TRUE)
## lavaan 0.6-18 ended normally after 33 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        28
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                47.389
##   Degrees of freedom                                38
##   P-value (Chi-square)                           0.141
## 
## Parameter Estimates:
## 
##   Standard errors                            Bootstrap
##   Number of requested bootstrap draws             1000
##   Number of successful bootstrap draws            1000
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   attitudes =~                                                          
##     attit_1           1.000                               1.000    1.000
##     attit_2           1.034    0.060   17.222    0.000    0.925    1.167
##     attit_3          -1.021    0.064  -15.877    0.000   -1.158   -0.898
##   norms =~                                                              
##     norm_1            1.000                               1.000    1.000
##     norm_2            0.985    0.071   13.803    0.000    0.848    1.133
##     norm_3            0.948    0.093   10.204    0.000    0.786    1.155
##   control =~                                                            
##     control_1         1.000                               1.000    1.000
##     control_2         0.861    0.113    7.635    0.000    0.653    1.100
##     control_3         0.996    0.142    7.020    0.000    0.760    1.318
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   intent ~                                                              
##     attitudes         0.357    0.115    3.113    0.002    0.146    0.603
##     norms             0.646    0.095    6.794    0.000    0.473    0.859
##     control    (a)    0.199    0.199    1.002    0.317   -0.188    0.633
##   behavior ~                                                            
##     intent     (b)    0.551    0.074    7.487    0.000    0.391    0.683
##     control    (c)    0.469    0.142    3.298    0.001    0.231    0.791
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   attitudes ~~                                                          
##     norms             0.344    0.070    4.905    0.000    0.210    0.481
##     control           0.471    0.069    6.838    0.000    0.342    0.608
##   norms ~~                                                              
##     control           0.345    0.066    5.240    0.000    0.215    0.481
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .attit_1           0.429    0.050    8.628    0.000    0.329    0.524
##    .attit_2           0.325    0.045    7.230    0.000    0.233    0.408
##    .attit_3           0.347    0.049    7.011    0.000    0.248    0.455
##    .norm_1            0.490    0.060    8.172    0.000    0.373    0.612
##    .norm_2            0.525    0.076    6.869    0.000    0.385    0.684
##    .norm_3            0.599    0.070    8.529    0.000    0.447    0.729
##    .control_1         0.626    0.074    8.429    0.000    0.479    0.761
##    .control_2         0.875    0.092    9.522    0.000    0.689    1.049
##    .control_3         0.748    0.078    9.532    0.000    0.579    0.893
##    .intent            0.412    0.050    8.283    0.000    0.307    0.504
##    .behavior          0.541    0.055    9.873    0.000    0.423    0.639
##     attitudes         0.875    0.104    8.385    0.000    0.676    1.081
##     norms             0.757    0.099    7.616    0.000    0.560    0.949
##     control           0.484    0.095    5.092    0.000    0.306    0.683
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     ie                0.110    0.105    1.048    0.295   -0.105    0.309
##     total             0.578    0.186    3.108    0.002    0.235    0.971
Click for explanation

From the above results, we can see that the direct and total effects are both significant, but the indirect effect is not. Hence, it probably makes the most sense to include control via a direct (non-mediated) effect on behavior.


Approach 2.1: Nested Model Comparison

Click to show code

We can also approach this problem from a model-comparison perspective. We can fit models that encode each pattern of constraints and check which one best represents the data.

## Force complete mediation:
mod2 <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
             
intent   ~ attitudes + norms + control
behavior ~ intent
'

## Force no mediation:
mod3 <- '
attitudes =~ attit_1   + attit_2   + attit_3
norms     =~ norm_1    + norm_2    + norm_3
control   =~ control_1 + control_2 + control_3
             
intent   ~ attitudes + norms
behavior ~ intent + control
'

## Estimate the two restricted models:
fit2 <- sem(mod2, data = condom)
fit3 <- sem(mod3, data = condom)

## Check the results:
summary(fit2)
## lavaan 0.6-18 ended normally after 33 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        27
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                62.797
##   Degrees of freedom                                39
##   P-value (Chi-square)                           0.009
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes =~                                        
##     attit_1           1.000                           
##     attit_2           1.033    0.068   15.295    0.000
##     attit_3          -1.018    0.068  -15.087    0.000
##   norms =~                                            
##     norm_1            1.000                           
##     norm_2            0.985    0.087   11.305    0.000
##     norm_3            0.947    0.087   10.845    0.000
##   control =~                                          
##     control_1         1.000                           
##     control_2         0.864    0.126    6.855    0.000
##     control_3         0.958    0.129    7.417    0.000
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   intent ~                                            
##     attitudes         0.352    0.096    3.669    0.000
##     norms             0.644    0.088    7.347    0.000
##     control           0.207    0.163    1.268    0.205
##   behavior ~                                          
##     intent            0.746    0.045   16.443    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes ~~                                        
##     norms             0.345    0.069    5.023    0.000
##     control           0.476    0.073    6.513    0.000
##   norms ~~                                            
##     control           0.346    0.065    5.361    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .attit_1           0.427    0.051    8.295    0.000
##    .attit_2           0.325    0.046    7.101    0.000
##    .attit_3           0.349    0.047    7.477    0.000
##    .norm_1            0.490    0.064    7.702    0.000
##    .norm_2            0.524    0.065    8.025    0.000
##    .norm_3            0.600    0.069    8.652    0.000
##    .control_1         0.610    0.076    8.015    0.000
##    .control_2         0.861    0.090    9.580    0.000
##    .control_3         0.769    0.086    8.938    0.000
##    .intent            0.412    0.046    8.890    0.000
##    .behavior          0.603    0.054   11.180    0.000
##     attitudes         0.877    0.115    7.596    0.000
##     norms             0.757    0.112    6.733    0.000
##     control           0.500    0.098    5.076    0.000
summary(fit3)
## lavaan 0.6-18 ended normally after 31 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        27
## 
##   Number of observations                           250
## 
## Model Test User Model:
##                                                       
##   Test statistic                                48.757
##   Degrees of freedom                                39
##   P-value (Chi-square)                           0.136
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes =~                                        
##     attit_1           1.000                           
##     attit_2           1.033    0.068   15.221    0.000
##     attit_3          -1.025    0.068  -15.097    0.000
##   norms =~                                            
##     norm_1            1.000                           
##     norm_2            0.984    0.087   11.256    0.000
##     norm_3            0.955    0.088   10.881    0.000
##   control =~                                          
##     control_1         1.000                           
##     control_2         0.859    0.127    6.789    0.000
##     control_3         0.997    0.131    7.609    0.000
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   intent ~                                            
##     attitudes         0.447    0.063    7.100    0.000
##     norms             0.706    0.078    9.078    0.000
##   behavior ~                                          
##     intent            0.563    0.063    8.923    0.000
##     control           0.454    0.119    3.805    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   attitudes ~~                                        
##     norms             0.342    0.068    5.011    0.000
##     control           0.474    0.072    6.548    0.000
##   norms ~~                                            
##     control           0.352    0.064    5.521    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .attit_1           0.432    0.052    8.381    0.000
##    .attit_2           0.330    0.046    7.220    0.000
##    .attit_3           0.344    0.046    7.439    0.000
##    .norm_1            0.496    0.063    7.820    0.000
##    .norm_2            0.533    0.065    8.152    0.000
##    .norm_3            0.595    0.069    8.643    0.000
##    .control_1         0.625    0.075    8.372    0.000
##    .control_2         0.876    0.090    9.757    0.000
##    .control_3         0.746    0.084    8.874    0.000
##    .intent            0.409    0.047    8.769    0.000
##    .behavior          0.542    0.052   10.423    0.000
##     attitudes         0.872    0.115    7.566    0.000
##     norms             0.751    0.112    6.709    0.000
##     control           0.485    0.096    5.059    0.000
## Do either of the restricted models fit worse than the partial mediation model?
anova(fit1, fit2)
anova(fit1, fit3)
Click for explanation

The above \(\Delta \chi^2\) tests tell us that the full mediation model fits significantly worse than the partial mediation model. Hence, forcing full mediation by fixing the direct effect to zero is an unreasonable restraint. The total effect model, on the other hand, does not fit significantly worse than the partial mediation model. So, we can conclude that removing the indirect effect and modeling the influence of control on behavior as an un-mediated direct association represents the data just as well as a model that allows for both indirect and direct effects. Hence, we should prefer the more parsimonious total effects model.


Approach 2.2: Non-Nested Model Comparison

Click to show code

We can also use information criteria to compare our models. The two most popular information criteria are the Akaike’s Information Criterion (AIC) and the Bayesian Information Criterion (BIC).

## Which model is the most parsimonious representation of the data?
AIC(fit1, fit2, fit3)
BIC(fit1, fit2, fit3)
Click for explanation

While the effect tests and the nested model comparisons both lead us to prefer the non-mediated model, we cannot directly say that the complete mediation model fits significantly worse than the non-mediated model. We have not directly compared those two models, and we cannot do so with the \(\Delta \chi^2\). We cannot do such a test because these two models are not nested: we must both add and remove a path to get from one model specification to the other. Also, both models have the same degrees of freedom, so we cannot define a sampling distribution against which we would compare the \(\Delta \chi^2\), anyway.

We can use information criteria to get around this problem, though. Information criteria can be used to compare both nested and non-nested models. These criteria are designed to rank models by balancing their fit to the data and their complexity. When comparing models based on information criteria, a lower value indicates a better model in the sense of a better balance of fit and parsimony. The above results show that both the AIC and the BIC agree that the no-mediation model is the best.


Conclusion

Click for explanation

So, in the end, regardless of how we approach the question, all of our results suggest modeling perceived behavioral control as a direct, non-mediated predictor of condom use.


End of In-Class Exercises