Learn R Programming

SignifReg (version 3.0)

drop1SignifReg: Drop a predictor to a linear regression model using the backward step in the Significance Controlled Variable Selection method

Description

drop1SignifReg removes from the model the predictor, out of the current predictors, which minimizes the criterion (AIC, BIC, r-ajd, PRESS, max p-value) when a) the p-values of the predictors in the current model do not pass the multiple testing correction (Bonferroni, FDR, None) or b) when the p-values of both current and prospective models pass the correction but the criterion of the prospective model is smaller.

max_pvalue indicates the maximum p-value from the multiple t-tests for each predictor. More specifically, the algorithm computes the prospective models with each predictor removed, and all p-values of this prospective model. Then, the predictor to be removed is the one whose generating model has the smallest p-values, in fact, the minimum of the maximum p-values in each prospective model.

Usage

drop1SignifReg(fit, scope, alpha = 0.05, criterion = "p-value",
 correction = "FDR", override = FALSE)

Arguments

fit

an lm object representing a model.

scope

The range of models examined in regression. It should be either a data.frame or formula containing predictors. When scope is data.frame, all variables except the response variable in the data.frame are considered for the variable selection.

alpha

Significance level. Default value is 0.05.

criterion

Criterion to select predictor variables. criterion = "AIC", criterion = "BIC", criterion = "r-adj" (adjusted r-square), and criterion = "p-value" are available. Default is p-value.

correction

Correction criterion to reduce multiple testing error. correction = "FDR" (False Discovery Rate), correction = "Bonferroni", and

correction = "None" (no correction) are available. Default is

correction = "FDR" . For Bonferroni correction,

either correction = "Bonferroni" or correction = "Bonf" can be used.

override

If override = TRUE, it returns a new lm object that excludes a predictor according to criterion even if the prospective model passes the correction.

References

Zambom A Z, Kim J. Consistent significance controlled variable selection in high-dimensional regression. Stat.2018;7:e210. https://doi.org/10.1002/sta4.210

See Also

SignifReg, add1summary, add1SignifReg, drop1summary,

Examples

Run this code
# NOT RUN {
##mtcars data is used as an example.

data(mtcars)

fit3 <- lm(mpg~., mtcars)
drop1SignifReg(fit3)
drop1SignifReg(fit3, scope=~.-disp-cyl-wt-hp-drat-qset-carb ,correction="Bonf")
# }

Run the code above in your browser using DataLab