Logistic regression using p-values to select final model
Source:R/pvalue_informed_regression.R
pvalue_informed_regression.Rd
Performs unadjusted logistic regression to identify candidate variables that fall under an p-value threshold (entry_criteria). Forward variable selection is performed to introduce variables into the model and retain if they fall within a more stringent criteria (retention_criteria).
Usage
pvalue_informed_regression(
outcome,
dataset,
variables,
entry_criteria = 0.2,
retention_criteria = 0.1
)
Arguments
- outcome
Outcome of interest
- dataset
Dataframe that contains the trait and exposure variables
- variables
Exposure variables of interest. Must be numeric or one-hot encoded
- entry_criteria
P-value criteria for entry into the model. Default = 0.2
- retention_criteria
P-value criteria for retention into the model. Default = 0.1