Logistic regression using stepwise Akaike information criteria selection
Source:R/AIC_stepwise_regression.R
AIC_stepwise_regression.Rd
Performs Akaike information criterion (AIC) informed variable selection using the stats::step function.
Arguments
- outcome
Outcome of interest. Character string.
- dataset
Dataframe that contains the trait and exposure variables
- variables
Exposure variables of interest. Must be numeric or one-hot encoded.
- stepwise_direction
Direction of stepwise selection. Options include: 'both', 'backward', or 'forward'. For more information on these selection methods, see stats::step.