When conducting a joint-significant test, different models are fitted to the data. This function helps accessing the models used in an object of class mediation_model.

extract_models(mediation_model)

Arguments

mediation_model

An object of class mediation_model.

Value

A list of lm objects.

See also

Other extract functions: extract_model(), extract_tidy_models()

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)

extract_models(my_model)
#> $`X -> Y`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Coefficients:
#> (Intercept)  condition_c  
#>      4.5676       0.1714  
#> 
#> 
#> $`X -> M`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Coefficients:
#> (Intercept)  condition_c  
#>      5.1580       0.7717  
#> 
#> 
#> $`X + M -> Y`
#> 
#> Call:
#> lm(formula = .x, data = data)
#> 
#> Coefficients:
#> (Intercept)  condition_c   linkedfate  
#>     3.60373      0.02725      0.18686  
#> 
#>