View source: R/multivariate_selection.R
Variable selection for a multivariate logistic regression model
1 2 3 4 5 6 7 8 9 10 11 12 13 | multivariate_selection(
DF,
y,
explicatives,
keep,
principal_factor = FALSE,
method = "backward",
criteria = "deviance",
check_interactions = FALSE,
alpha = 0.05,
verbose = TRUE,
delta = 7
)
|
DF |
dataframe |
y |
character : variable to explain by 'explicatives' |
explicatives |
vector of character : variables to be selected in the multivariate model |
keep |
character or vector (optional) : variables that will be kept in the model no matter of its statistical importance Every variable known in the litterature to have interaction with y or other 'keep' variable should be listed in 'keep'. |
principal_factor |
(optional) : principal criteria to explain y. It will be th first variable to be selected and won't be removed from selection. |
method |
character : can be backward, forward. You can pass other arguments such as augmented or stepwise as follow "backward stepwise augmented". |
criteria |
character : the criteria that will be used to select models. Can be deviance, AIC and BIC. |
check_interactions |
logical : wether interaction between the principal_factor and the other variables should be checked. |
alpha |
num : the threesold that should be used to consider a test as significant |
verbose |
logical : whether the details of the calculs should be displayed on the console |
delta |
num : threeshold of difference in BIC or AIC to consider a model as more informative |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.