View source: R/dominance_analysis.R
dominance_analysis  R Documentation 
Computes Dominance Analysis Statistics and Designations
dominance_analysis(
model,
sets = NULL,
all = NULL,
conditional = TRUE,
complete = TRUE,
quote_args = NULL,
contrasts = model$contrasts,
...
)
model 
A model object supported by 
sets 
A (named) list of formula objects with no left hand side/response. If the list has names, the name provided each element will be used as the label for the set. Unnamed list elements will be provided a set number name based on its position among the sets as entered. Predictors in each formula are bound together as a set in the dominance
analysis and dominance statistics and designations are computed for
the predictors together. Predictors in 
all 
A formula with no left hand side/response. Predictors in the formula are included in each subset in the dominance
analysis and the R2 value associated with them is subtracted from the
overall value. Predictors in 
conditional 
Logical. If If conditional dominance is not desired as an importance criterion, avoiding computing the conditional dominance matrix can save computation time. 
complete 
Logical. If If complete dominance is not desired as an importance criterion, avoiding computing complete dominance designations can save computation time. 
quote_args 
A character vector of arguments in the model submitted to

contrasts 
A named list of 
... 
Not used at current. 
Computes two decompositions of the model's R2 and returns a matrix of designations from which predictor relative importance determinations can be obtained.
Note in the output that the "constant" subset is associated with a component of the model that does not directly contribute to the R2 such as an intercept. The "all" subset is apportioned a component of the fit statistic but is not considered a part of the dominance analysis and therefore does not receive a rank, conditional dominance statistics, or complete dominance designations.
The input model is parsed using insight::find_predictors()
, does not
yet support interactions, transformations, or offsets applied in the R
formula, and will fail with an error if any such terms are detected.
The model submitted must accept an formula object as a formula
argument. In addition, the model object must accept the data on which
the model is estimated as a data
argument. Formulas submitted
using object references (i.e., lm(mtcars$mpg ~ mtcars$vs)
) and
functions that accept data as a nondata
argument
(e.g., survey::svyglm()
uses design
) will fail with an error.
Models that return TRUE
for the insight::model_info()
function's values "is_bayesian", "is_mixed", "is_gam",
is_multivariate", "is_zero_inflated",
or "is_hurdle" are not supported at current.
When performance::r2()
returns multiple values, only the first is used
by default.
Object of class "parameters_da"
.
An object of class "parameters_da"
is a list of data.frame
s composed
of the following elements:
General
A data.frame
which associates dominance statistics with
model parameters. The variables in this data.frame
include:
Parameter
Parameter names.
General_Dominance
Vector of general dominance statistics.
The R2 ascribed to variables in the all
argument are also reported
here though they are not general dominance statistics.
Percent
Vector of general dominance statistics normalized to sum to 1.
Ranks
Vector of ranks applied to the general dominance statistics.
Subset
Names of the subset to which the parameter belongs in
the dominance analysis. Each other data.frame
returned will refer
to these subset names.
Conditional
A data.frame
of conditional dominance
statistics. Each observation represents a subset and each variable
represents an the average increment to R2 with a specific number of
subsets in the model. NULL
if conditional
argument is FALSE
.
Complete
A data.frame
of complete dominance
designations. The subsets in the observations are compared to the
subsets referenced in each variable. Whether the subset
in each variable dominates the subset in each observation is
represented in the logical value. NULL
if complete
argument is FALSE
.
Joseph Luchman
Azen, R., & Budescu, D. V. (2003). The dominance analysis approach for comparing predictors in multiple regression. Psychological Methods, 8(2), 129148. doi:10.1037/1082989X.8.2.129
Budescu, D. V. (1993). Dominance analysis: A new approach to the problem of relative importance of predictors in multiple regression. Psychological Bulletin, 114(3), 542551. doi:10.1037/00332909.114.3.542
Groemping, U. (2007). Estimators of relative importance in linear regression based on variance decomposition. The American Statistician, 61(2), 139147. doi:10.1198/000313007X188252
domir::domin()
data(mtcars)
# Dominance Analysis with Logit Regression
model < glm(vs ~ cyl + carb + mpg, data = mtcars, family = binomial())
performance::r2(model)
dominance_analysis(model)
# Dominance Analysis with Weighted Logit Regression
model_wt < glm(vs ~ cyl + carb + mpg,
data = mtcars,
weights = wt, family = quasibinomial()
)
dominance_analysis(model_wt, quote_args = "weights")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.