Description Usage Arguments Value Author(s) See Also Examples
View source: R/backward_select.R
P-value based backward selection on Generalized Linear Models (GLMs).
1 2 3 4 5 6 7 | backward_select(
object,
data = NULL,
backward.test = "LRT",
backward.alpha = 0.05,
family = gaussian(link = "identity")
)
|
object |
An object of class |
data |
Data needed for creation of models. Default is |
backward.test |
Test to obtain P-values of predictors during the backward elimination process. Valid values are |
backward.alpha |
The maximum alpha value that predictors with P-values greater than that will be sequentially removed. Default value is 0.05. |
family |
The family of the response variable. Default is |
If the object is from class autoGAM_frame, the $`best forms` & $`final predictors` parts of the object will be updated and a list of sequential results of backward elimination process will be added to the autoGAM_frame list. If the object is a formula, the mentioned sequential list of backward process will be returned.
Shahin Roshani
https://shahin-roshani.github.io/autoGAM/articles/autoGAM.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
my_mtcars <- mtcars %>% mutate_at('vs',as.factor)
carsGAM <- autoGAM_frame(mpg~disp+drat+vs,data=my_mtcars)
backward_select(carsGAM)
#Or for example:
backward_select(mpg~poly(disp,2)+I(drat^3)+vs,data=my_mtcars)
my_iris <- iris %>% filter(Species!='setosa')
backward_select(Species~ns(Sepal.Length,3)+cut(Petal.Width,2),data=my_iris,family=binomial(link='logit'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.