add1summary {SignifReg} | R Documentation |
Summaries of models when adding a predictor in (generalized) linear models
Description
Offers summaries of prospective models as every available predictor in the scope is added to the model.
Usage
add1summary(fit, scope, alpha = 0.05, adjust.method = "fdr", sort.by = "p-value")
Arguments
fit |
an lm or glm object representing a model. |
scope |
defines the range of models examined in the stepwise search. This should be either a single formula, or a list containing components upper and lower, both formulae. See the details for how to specify the formulae and how they are used. |
alpha |
Significance level. Default value is 0.05. |
adjust.method |
Correction for multiple testing accumulation of error. See |
sort.by |
The criterion to use to sort the table of prospective models. Must be one of |
Details
max_pvalue
indicates the maximum p-value from the multiple t-tests for each predictor.
Value
a table with the possible inclusions and the metrics of the prospective models: AIC, BIC, adj.rsq, PRESS, max_pvalue, max.VIF, and whether it passed the chosen p-value correction.
Author(s)
Jongwook Kim <jongwook226@gmail.com>
Adriano Zanin Zambom <adriano.zambom@gmail.com>
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
, add1SignifReg
, drop1summary
, drop1SignifReg
Examples
##mtcars data is used as an example.
data(mtcars)
nullmodel = lm(mpg~1, mtcars)
fullmodel = lm(mpg~., mtcars)
scope = list(lower=formula(nullmodel),upper=formula(fullmodel))
fit1 <- lm(mpg~1, mtcars)
add1summary(fit1, scope = scope)
fit2 <- lm(mpg~disp+cyl+wt+qsec+cyl, data = mtcars)
add1summary(fit2, scope = scope)