
Table 3: multivariable logistic-regression odds ratios with clinically scaled increments
Source:R/odds_ratios.R
generate_table3_odds_ratios.RdPer-1-unit odds ratios of continuous predictors (systolic BP, glucose, eGFR) round to an uninformative
1.00 (1.00-1.00). This reports them per 1 SD (or a stated increment such as 10 mmHg) instead, with Wald 95% CIs,
standardized betas and p-values. Mirror of Python omop_etl.odds_ratios.generate_table3_odds_ratios.
Usage
generate_table3_odds_ratios(
model,
X,
y,
feature_names = NULL,
continuous_scale = "sd",
labels = NULL,
beta_places = 2L
)Arguments
- model
A fitted binomial
stats::glm()(its coefficients and standard errors are used), orNULLto fit an unpenalised logistic regression here.- X
Data frame / matrix of predictors, in the model's coefficient order.
- y
0/1 outcome, one value per row of
X.- feature_names
Column names (default
colnames(X)).- continuous_scale
"sd"reports non-binary predictors per 1 SD; a named vector / listc(systolic_bp = 10)sets the increment per predictor (others stay per 1 unit);NULLkeeps everything per 1 unit. 0/1 predictors are always "Yes vs No".- labels
Optional named character vector of display names.
- beta_places
Decimals for the standardized beta (default 2).