surr_rsq_rank {SurrogateRsq} | R Documentation |
The contribution of each variable in the final model
Description
This function calculates reduction of the surrogate R-squared goodness-of-fit of each variable to measure their relative explanatory power. This function creates a table containing the reductions of surrogate R-squared by removing each one of variables in the model.
Usage
surr_rsq_rank(object, avg.num = 30, var.set = NA, ...)
Arguments
object |
A object of class |
avg.num |
The number of replication for the averaging of surrogate R-square. |
var.set |
A list that contains a few sets. Each component of these sets represents the variables that you want to examine for the contribution of goodness of fit. Then, for one component of this list, a model will fit by removing the specified variables. |
... |
Additional optional arguments. |
Value
The default return is a list that contains the contribution of Surrogate R-squared for each
variable in the full_model
. If the var.set
is specified, the return is a list of the
contribution of the groups of variables in the var.set
.
Examples
data("WhiteWine")
sele_formula <- as.formula(quality ~ fixed.acidity + volatile.acidity +
residual.sugar + + free.sulfur.dioxide +
pH + sulphates + alcohol)
sele_mod <- polr(formula = sele_formula,
data = WhiteWine,
method = "probit")
sur1 <- surr_rsq(model = sele_mod,
full_model = sele_mod,
avg.num = 100)
rank_tab_sur1 <- surr_rsq_rank(object = sur1,
avg.num = 30)
print(rank_tab_sur1)