dominance: dominance

View source: R/dominance.R

dominanceR Documentation

dominance

Description

Runs a bootstrapped dominance analysis (aka relative weighting analysis or Shapley regression) via the relaimpo package and returns a dataframe of all relative importance values and the associated ranks.

Usage

dominance(
  mod,
  n_boot = 1000,
  method = c("lmg", "pmvd", "last", "first", "betasq", "pratt", "genizi", "car"),
  seed = 8675309,
  ...
)

Arguments

mod

Regression model input.

n_boot

Number of bootstrapped model samples to assess.

method

Method for assessing variable dominance, passed to relaimpo.

seed

Random seed.

Value

Dataframe with model method, bootstrapped sample number, predictor variable name, dominance values, and variable ranks.

Examples

## Not run: 
mtcars |>
  lm(mpg ~ cyl + wt + hp,
     data = _) |>
    dominance(n_boot = 500,
              method = "car")

## End(Not run)


toddellis/miao documentation built on June 1, 2025, 10:11 p.m.