`r lifecycle::badge('stable')` Convenience function to extract outputs from yhat::dominance function

run_dominance(formula, data, type = "general")

Arguments

formula

Formula for linear regression

data

Dataframe containing values to calculate dominance from

type

Character. Either "general", "conditional" or "complete".

Value

Dominance values according to type argument. See details.

Details

This function uses arguments for formula and data to calculate dominance values from a linear regression. When type == "general", returns a vector with general dominance values for each DV. When type == "conditional", returns a matrix with dominance values with columns corresponding to the DV and rows corresponding to the number of variables in configuration. When type == "complete", returns complete table for dominance. See https://rdrr.io/cran/domir/f/vignettes/domir_basics.Rmd for more information on interpreting dominance analysis outputs.

See also

[run_dominance_boot()]

Examples

run_dominance(mpg~cyl+hp, data = mtcars, type = "general")
#>       cyl        hp 
#> 0.4322255 0.3084829 
run_dominance(mpg~cyl+hp, data = mtcars, type = "conditional")
#>            cyl         hp
#> CD:0 0.7261800 0.60243734
#> CD:1 0.1382711 0.01452842
run_dominance(mpg~cyl+hp, data = mtcars, type = "complete")
#>        k        R2   cyl.Inc     hp.Inc
#> cyl    1 0.7261800        NA 0.01452842
#> hp     1 0.6024373 0.1382711         NA
#> cyl,hp 2 0.7407084        NA         NA