When conducting a joint-significance test, different models are fitted to the data. This function helps you see a summary of the models that have been used in an object of class mediation_model.

display_models(mediation_model)

Arguments

mediation_model

An object of class mediation_model.

Value

A list of summary.lm objects.

Examples

data(ho_et_al)
ho_et_al$condition_c <- build_contrast(ho_et_al$condition,
                                       "Low discrimination",
                                       "High discrimination")
my_model <-
  mdt_simple(data = ho_et_al,
             IV = condition_c,
             DV = hypodescent,
             M = linkedfate)

display_models(my_model)
#> $`X -> Y`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -3.6533 -0.6533 -0.4818  0.5182  2.5182 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)  4.56755    0.04026 113.442   <2e-16 ***
#> condition_c  0.17145    0.08053   2.129   0.0335 *  
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Residual standard error: 1.151 on 822 degrees of freedom
#> Multiple R-squared:  0.005484,	Adjusted R-squared:  0.004274 
#> F-statistic: 4.533 on 1 and 822 DF,  p-value: 0.03354
#> 
#> 
#> $`X -> M`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -4.5438 -0.7938  0.1029  0.9562  2.2279 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)  5.15797    0.04239 121.690   <2e-16 ***
#> condition_c  0.77167    0.08477   9.103   <2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Residual standard error: 1.212 on 822 degrees of freedom
#> Multiple R-squared:  0.09158,	Adjusted R-squared:  0.09047 
#> F-statistic: 82.86 on 1 and 822 DF,  p-value: < 2.2e-16
#> 
#> 
#> $`X + M -> Y`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -3.7852 -0.7152 -0.3648  0.5719  2.9427 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)  3.60373    0.17225  20.922  < 2e-16 ***
#> condition_c  0.02725    0.08289   0.329    0.742    
#> linkedfate   0.18686    0.03250   5.749 1.27e-08 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Residual standard error: 1.13 on 821 degrees of freedom
#> Multiple R-squared:  0.04397,	Adjusted R-squared:  0.04164 
#> F-statistic: 18.88 on 2 and 821 DF,  p-value: 9.638e-09
#> 
#>