Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/permute.varimp.R
Calculate variable importance in a model by randomly permuting the values of each variable.
1 | permute.varimp(fit, data = NULL, verbose = FALSE, ranef = TRUE)
|
fit |
a object of class |
data |
the dataframe on which |
verbose |
logical. If |
ranef |
logical. If |
For each predictor in the model, the values of that predictor are randomly permuted to break their association with the response, and the model is re-fit to a new dataset containing the permuted values. The fit of the new model is compared to that of the original model. Three measures of model fit are calculated: The concordance C, Accuracy (
A dataframe with 3 columns and k rows, where k is the number of individual predictors in the model. Columns are as follows:
Predictor |
name of predictor |
C |
difference in the concordance statistic C (a.k.a. AUC) between the original model and the model with the permuted predictor |
accuracy |
difference in the proportion of observations correctly predicted between the original model and the model with the permuted predictor |
AICc |
difference in the conditional AIC (see Burnham and Anderson 2002) between the original model and the model with the permuted predictor |
J. Grafmiller
Burnham, K. P. and Anderson, D. R. (2002) Model selection and multimodel inference: a practical information-theoretic approach. 2nd ed. New York, Springer-Verlag.
AICc
in MuMIn
; somers2
in Hmisc
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data(brown_genitives)
require(lme4)
require(languageR)
genitive.glmm = glmer(Type ~ PossrAnimacyBin +
PossrWordC + Genre + (1|Text), data = brown_genitives,
family = binomial, control = glmerControl(optimizer = "bobyqa"))
genitive.glmm.tab <- permute.varimp{genitive.glmm, brown_genitives}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.