Your clinic just screened 768 patients for diabetes using the eight measurements in the Pima Indians diabetes dataset: number of pregnancies, glucose, blood pressure, skin thickness, insulin, BMI, age, and a diabetes pedigree function (a score summarizing family history of diabetes). Now the question: which of these measurements actually predicts who has diabetes? And by how much?
This is where most analyses go wrong. Clinicians eyeball correlations, compare group means, or worse: treat every biomarker as equally important. But correlation isn't prediction. A variable can look impressive in a t-test and contribute nothing once you control for other factors. Before you build a risk score, screen patients, or design an intervention, you need to know which predictors carry independent signal.
That's what diabetes risk factors analysis does. It's logistic regression with a focus: rank biomarkers by their independent predictive power, quantify each one's effect as an odds ratio, and evaluate how well the combined model classifies patients. You're not asking "are diabetics different?". You're asking "which measurements, holding all others constant, predict diabetes, and by how much?"
Here's how to run a proper analysis, interpret the results, and avoid the methodological traps that make most risk models unreliable in practice.
The Experimental Question: Prediction, Not Just Association
Let's be clear about what we're testing. The research question is: Given a patient's biomarker profile, what is their probability of having diabetes, and which biomarkers contribute most to that prediction?
This is a prediction problem, not an experimental one. You're working with observational data: cross-sectional measurements from patients who either have diabetes or don't. You didn't randomize patients to different glucose levels or BMI values. That means you can identify associations and build predictive models, but you cannot make causal claims.
Can you say "high glucose predicts diabetes"? Yes. Can you say "lowering glucose prevents diabetes"? Not from this analysis. For causal claims, you need randomized controlled trials. What you can do is rank risk factors by predictive strength, which tells you where to focus intervention research.
The Right Question
Prediction: "Which biomarkers best predict diabetes status, and what probability does this patient have?"
Causation: "Does lowering glucose prevent diabetes?", requires RCT, not observational analysis.
This analysis answers the first question. Use it to prioritize screening, build risk scores, and pick candidate targets for intervention research. Then design experiments to test those interventions.
Sample Size: How Many Patients Do You Need?
Before you run a single regression, check that you have enough positive cases for the number of predictors. Too few, and logistic regression produces unstable coefficients, wide confidence intervals, and odds ratios that swing wildly between datasets. You're wasting everyone's time.
The rule of thumb: 10-15 events (positive cases) per predictor variable. If you're testing 8 biomarkers, you need at least 80-120 patients with diabetes. In the Pima Indian dataset (public, R package mlbench), there are 268 diabetic patients out of 768 total (35% prevalence), giving 33.5 events per predictor (268 / 8), comfortably above the rule of thumb. Events per variable is a rough heuristic for limiting overfitting, not a power calculation: whether you can detect a given odds ratio depends on its size, the predictor's spread, and the significance level, and needs a formal sample-size calculation with those assumptions stated.
If your diabetes prevalence is lower, say 10%, you'd need 800-1,200 patients total to get the same 80-120 events. Most hospital datasets can hit this. Primary care clinics might struggle. If you're below the threshold, either collect more data or reduce the number of predictors (use univariate screening to pick the top 4-5).
What happens if you ignore this? Your model overfits. Coefficients are biased away from zero. Odds ratios look impressive in your training data and shrink when you validate on new patients. Don't be that study.
Sample Size Checklist (Rule of Thumb)
- Count positive cases: How many patients have diabetes?
- Count predictors: How many biomarkers are you testing?
- Calculate ratio: Events per variable = diabetic patients ÷ predictors
- Target: 10-15 EPV minimum, 20+ is better
- If underpowered: Collect more data or reduce predictors
How Logistic Regression Ranks Risk Factors
Logistic regression models the log-odds of diabetes as a linear combination of biomarkers:
log(P(diabetes) / (1 - P(diabetes))) = β₀ + β₁·Glucose + β₂·BMI + β₃·Age + ...
Each coefficient (β) tells you how much the log-odds change when that biomarker increases by one unit, holding all other biomarkers constant. Exponentiate the coefficient and you get an odds ratio: the multiplicative change in odds for a one-unit increase.
Why odds ratios? Because they're interpretable. An odds ratio of 1.91 for BMI (the Pima value in the worked example below) means: increase BMI by one standard deviation, and the odds of diabetes multiply by 1.91. If a patient's baseline odds are 1:3 (25% probability), moving up one SD in BMI changes the odds to 1.91:3 (39% probability).
The key phrase: holding all other biomarkers constant. That's what makes this a ranking of independent effects. Glucose and BMI are correlated (r=0.23 among patients with both values recorded in the Pima data). If you just compare diabetics vs non-diabetics on glucose alone, you're seeing the combined effect of glucose plus everything glucose correlates with. Logistic regression isolates glucose's unique contribution.
Here's what the model does step-by-step:
- Standardize predictors: Convert each biomarker to z-scores (mean=0, SD=1) so coefficients are comparable.
- Fit coefficients: Find the β values that maximize the likelihood of the observed diabetes outcomes.
- Calculate odds ratios: Exponentiate each β to get the odds multiplier for a 1-SD increase.
- Test significance: Compute 95% confidence intervals; if the CI includes 1.0, the effect is not statistically significant.
- Rank by magnitude: Sort odds ratios from largest to smallest to identify top risk factors.
Worked example: the Pima data, cleaned and fitted in code
In this illustrative example, your clinic's 768 patients are the public Pima Indians Diabetes records (R package mlbench: 268 diabetic, 500 not). Every number in the example comes from the code kept beside this article. Cleaning is outcome-free, meaning it never looks at who has diabetes. Zero is not a possible reading for glucose, blood pressure, skin thickness, insulin, or BMI, so a zero is treated as an unrecorded value: glucose has 5 zeros, blood pressure 35, skin thickness 227, insulin 374, and BMI 11. Odds ratios, AUC, accuracy, variance inflation factors, and group z-scores are computed after each missing value is replaced by the overall median of that column's recorded values (glucose 117, blood pressure 72, skin thickness 29, insulin 125, BMI 32). Correlations and group medians use only the recorded values.
cl <- d[, vars] # d = mlbench::PimaIndiansDiabetes
for (v in c("glucose","pressure","triceps","insulin","mass")) {
cl[[v]][cl[[v]] == 0] <- NA # zero = unrecorded
cl[[v]][is.na(cl[[v]])] <- median(cl[[v]], na.rm = TRUE) # overall median of recorded values
}
z <- as.data.frame(scale(cl)); z$y <- as.integer(d$diabetes == "pos")
fit <- glm(y ~ ., data = z, family = binomial) # odds ratio per 1 SD = exp(coef(fit))
The output is a ranked list: Glucose (OR=3.17), BMI (OR=1.91), Pregnancies (OR=1.52), Pedigree (OR=1.34), Age (OR=1.17), and so on. Variables with OR near 1.0 contribute nothing. Variables with wide confidence intervals are uncertain. Variables with OR significantly above 1.0 are your signal.
Model Performance: AUC and Classification Accuracy
Odds ratios tell you which biomarkers matter. But how well does the model actually predict diabetes? For that, you need classification metrics: AUC (area under the ROC curve), sensitivity, specificity, and overall accuracy.
AUC is the probability that a randomly selected diabetic patient has a higher predicted probability than a randomly selected non-diabetic patient. It ranges from 0.5 (coin flip) to 1.0 (perfect separation). Clinical prediction models typically achieve:
- 0.70-0.75: Acceptable (better than simple rules)
- 0.75-0.80: Good (useful for screening)
- 0.80-0.85: Very good (useful for diagnosis)
- Above 0.85: Excellent (rare for multi-biomarker models)
The Pima Indian diabetes model fitted above has an AUC of 0.84, which is "very good" on this scale. That figure is measured on the same 768 patients the model was fitted on, so it is optimistic; it has not been checked on held-out patients. If your model scores below 0.70, you're missing important predictors or have data quality problems.
Accuracy is the percentage of patients correctly classified (true positives + true negatives) ÷ total. At a 0.5 probability threshold the Pima model classifies 77% of patients correctly, roughly 3 out of 4. But accuracy alone is misleading if classes are imbalanced: predicting "non-diabetic" for every patient here would already score 65%, because 35% have diabetes. If 90% of patients are non-diabetic, that same trick achieves 90% accuracy while being clinically useless.
That's why you also report sensitivity (true positive rate: what % of diabetics are correctly identified) and specificity (true negative rate: what % of non-diabetics are correctly identified). At the 0.5 threshold the Pima model has sensitivity of 57% (it misses 43% of diabetic patients) and specificity of 88%. For diabetes screening, you typically optimize for high sensitivity (catch most diabetics) while accepting lower specificity (some false alarms), which means lowering the threshold below 0.5.
Classification Metrics Cheat Sheet
- AUC: Overall discriminative ability; 0.75+ is good
- Accuracy: % correct; can be misleading with class imbalance
- Sensitivity: % of diabetics caught; optimize for screening
- Specificity: % of non-diabetics correctly ruled out; avoid false alarms
- Trade-off: Adjust threshold to balance sensitivity vs specificity for your use case
Risk Factor Ranking by Odds Ratio
The odds ratios answer the question: which biomarkers predict diabetes, and by how much? Each odds ratio is for a one-standard-deviation increase in that biomarker, reported with a 95% confidence interval. Variables are ranked here from strongest to weakest.
In the Pima Indian dataset, Glucose dominates with an odds ratio of 3.17 (95% CI 2.51 to 3.99). After the median fill, glucose has a mean of 122 mg/dL and an SD of 30 mg/dL, so one SD above average is about 152 mg/dL. Moving from the average to that level multiplies the odds of diabetes by 3.17. If baseline odds are 1:2 (33% probability), they become 3.17:2 (61% probability). That's a large effect.
BMI comes in second with OR 1.91 (95% CI 1.50 to 2.43). One SD of BMI is 6.9 kg/m², and that much extra BMI nearly doubles the odds of diabetes. Pregnancies (OR 1.52, CI 1.23 to 1.89) and diabetes pedigree function (OR 1.34, CI 1.10 to 1.62) follow. Age has OR 1.17 (CI 0.94 to 1.45): the interval includes 1.0, so once glucose, BMI, and the rest are in the model, age's independent effect cannot be told apart from zero in this data. Blood pressure (OR 0.89, CI 0.73 to 1.09), insulin (OR 0.90, CI 0.75 to 1.09), and skin thickness (OR 1.03, CI 0.82 to 1.29) also have intervals that include 1.0.
Look at the confidence intervals. Glucose, BMI, pregnancies, and pedigree have intervals that exclude 1.0, so they are statistically distinguishable from no effect; glucose's interval (2.51 to 3.99) is far from 1.0. Age, blood pressure, insulin, and skin thickness have intervals that include 1.0, so treat them as uncertain. Their point estimates are not all above 1.0 either: blood pressure and insulin come out below it. If you're building a minimal risk score, you'd start with Glucose and BMI, add Pregnancies and Pedigree if they improve performance on held-out patients, and drop the marginal variables.
Here's what this tells you, and what it doesn't: glucose and BMI carry the most predictive signal in this data, so they are the strongest candidates for intervention research. The ranking does not show that lowering glucose or BMI would reduce diabetes risk the most, or that a blood pressure intervention would do less; observational data cannot answer that, and a randomized study can. That's the value of ranked effect sizes: they tell you which hypotheses to test first.
Measurement Distributions by Diabetes Status
Before you trust the logistic regression, look at the raw distributions. Compare each biomarker's distribution split by diabetes status. The key question: how much do the distributions separate?
Glucose shows the cleanest separation. Among recorded values, the non-diabetic median is 107 mg/dL and the diabetic median is 140 mg/dL. This is univariate discriminating power: glucose alone can classify many patients correctly, although the two groups still overlap. That's why it gets the highest odds ratio.
BMI shows moderate separation. Diabetics are heavier on average (recorded median 34 vs 30 kg/m²), but there's substantial overlap. Plenty of non-diabetics have high BMI, and some diabetics have normal BMI. BMI adds signal, but you can't diagnose diabetes from BMI alone.
Age and blood pressure show more overlap: the group gap is 0.50 SD for age and 0.35 SD for blood pressure, against 1.03 SD for glucose. The diabetic distribution shifts slightly higher, but the effect is weak. This matches the odds ratios. These variables contribute small independent effects.
Why look at distributions if you're already running regression? Because distributions reveal data quality problems. If you see bimodal distributions, outliers, or floor/ceiling effects, you need to investigate before modeling. If you see zero separation (distributions perfectly overlapping), that variable is useless and should be dropped. If you see perfect separation (no overlap), logistic regression will fail (complete separation problem) and you need exact methods.
The Pima data needs one cleaning step first: several columns record a missing measurement as 0 (insulin 374 times, skin thickness 227, blood pressure 35, BMI 11, and glucose 5), and those zeros must be set to missing before you model, as in the worked example above. After that, glucose has strong separation, BMI and age have moderate separation, and everything else is weak but not pathological. That's a good starting point for regression.
Feature Correlation Matrix
Multicollinearity, high correlation between predictors, inflates standard errors and makes individual coefficients unstable. Before you interpret odds ratios as "independent effects," check the correlation matrix. If two variables correlate at 0.8 or higher, you have a problem.
In the Pima data, among patients with both values recorded, the highest correlations are Skin thickness vs BMI (r = 0.65), Insulin vs Glucose (r = 0.58), and Age vs Pregnancies (r = 0.54). These are moderate correlations. They'll introduce some instability, but they won't break the model. Nothing approaches 0.8. Cleaning matters here: if the zeros are left in as real values, insulin vs glucose looks like r = 0.33 and understates the relationship.
What does moderate correlation mean practically? Insulin and glucose both measure glycemic control. When you include both in the model, their coefficients represent their unique contributions after accounting for their shared variance. Insulin's coefficient answers: "Holding glucose constant, does insulin add predictive power?" If the answer is "not much," insulin's odds ratio will sit near 1.0 with a wide confidence interval. That's what happens here: insulin's OR is 0.90 with a CI of 0.75 to 1.09. One caution: 374 of the 768 insulin values were filled with the median, which leaves little room for insulin to show an effect, so treat this odds ratio as uncertain.
Should you drop one of a correlated pair? Depends on your goal. If you're building a prediction model (maximize AUC), keep both, even redundant variables can add marginal signal. If you're building an interpretable risk score (understand independent effects), and two variables correlate above 0.7, pick the one with stronger univariate performance and drop the other.
The formal diagnostic is variance inflation factor (VIF). VIF = 1 ÷ (1 - R²), where R² is the R-squared from regressing that predictor on all other predictors. VIF above 5 is concerning; above 10 is serious. In the Pima fit the largest VIF is 1.62, so there is no multicollinearity problem. If your data shows VIF above 5, consider dropping variables or using regularized regression (LASSO/ridge).
Mean Biomarker Profiles: Diabetic vs Non-Diabetic
Comparing mean biomarker values for diabetic vs non-diabetic patients, standardized to z-scores, lets you compare across different units. A z-score of +1.0 means "one standard deviation above the population mean." Now you can directly compare glucose (measured in mg/dL) against BMI (measured in kg/m²) on the same scale.
Diabetic patients average +0.67 SD above the overall mean for glucose and non-diabetic patients average -0.36 SD, a gap of 1.03 SD (about 31 mg/dL). For BMI, diabetics average +0.43 SD (non-diabetics -0.23, a gap of 0.65 SD). For age, diabetics average +0.33 SD (non-diabetics -0.17, a gap of 0.50 SD). Non-diabetics average below zero on every biomarker (they're below the population mean, pulling the overall mean toward the middle).
Standardizing makes the effect sizes intuitive. Glucose shows the biggest gap between the diabetic and non-diabetic group means, which fits its high odds ratio. BMI shows a moderate gap (0.65 SD). The remaining gaps are smaller: age 0.50 SD, skin thickness 0.45 SD, pedigree function 0.36 SD, and blood pressure 0.35 SD. A gap in group means is not an independent effect: skin thickness has a 0.45 SD gap but an odds ratio of 1.03, because it tracks BMI (r = 0.65) and BMI carries the signal.
From an intervention design perspective, these gaps tell you the magnitude of change needed. If you want to move a diabetic patient's profile to look like a non-diabetic's, you need to reduce their glucose by about 1 standard deviation (roughly 31 mg/dL, the gap between the two group means), BMI by about 0.65 SD (about 4.5 kg/m²), and so on. That describes the size of the gap, not the effect of closing it; whether closing it lowers risk is a question for an intervention study.
Diabetes Prevalence by Age Group
Age is a continuous variable in the regression, but for clinical interpretation, it helps to bin patients into age groups and calculate prevalence in each band. Here is diabetes prevalence for 20-29, 30-39, 40-49, 50-59, and 60+ year-olds.
In the Pima dataset, diabetes prevalence is 21% in the 20-29 age group (396 patients), 46% in 30-39 (165 patients), 55% in 40-49 (118 patients), and 60% in 50-59 (57 patients). The 60+ group is lower at 28%, but it has only 32 patients, so that figure is noisy. The inflection point is around age 40, where prevalence passes 50%: that is when diabetes becomes more common than not in this population.
Why does age matter if glucose and BMI are stronger predictors in the regression? Because age is a proxy for cumulative exposure. Older patients have had more years of elevated glucose, more years of excess weight, more years of beta-cell stress. Age itself doesn't cause diabetes, but duration of exposure does. The regression captures age's independent effect after controlling for current glucose and BMI. It's picking up whatever aging-related risk isn't already explained by those biomarkers.
For screening programs, these rates tell you where to focus. If resources are limited, screen patients over 40 aggressively. If you screen 100 patients aged 50 or older, you'll find about 48 diabetics. Screen 100 patients under 30, and you'll find about 21. That's a 2.3x difference in yield.
One caution: the Pima Indian population has unusually high diabetes prevalence (35% overall vs ~10% in the general US population). Your age-specific prevalence will be lower in a general population, but the trend, sharply increasing risk with age, holds universally.
Glucose vs BMI by Diabetes Outcome
Logistic regression produces a decision boundary in the feature space. Consider that boundary in the two-dimensional glucose-BMI plane. The question: where does the model draw the line between low-risk and high-risk?
The boundary runs diagonally from bottom-left (low glucose, low BMI → non-diabetic) to top-right (high glucose, high BMI → diabetic). Patients in the top-right quadrant, high glucose and high BMI, are mostly diabetic. Patients in the bottom-left quadrant are almost all non-diabetic. The diagonal band in the middle is the uncertainty zone: some diabetics, some not.
Look at the top-right corner. Among the 22 patients with recorded glucose above 160 mg/dL and BMI above 40 kg/m², 82% are diabetic. Conversely, in the bottom-left corner (glucose below 100, BMI below 25), 0% of the 43 patients are diabetic. These are the easy classifications.
The middle diagonal is where the model struggles. Patients with glucose around 120 and BMI around 30 could go either way. Some diabetic patients fall on the low-risk side of the boundary, and some non-diabetic patients fall on the high-risk side. These are misclassifications, the model guessed wrong. That's where the 23% error rate (100% - 77% accuracy) comes from.
From a clinical decision-making perspective, this boundary tells you: if a patient has high glucose or high BMI, they're at elevated risk. If they have both, they're almost certainly diabetic. If they have neither, they're almost certainly not. The boundary isn't perfectly linear (the logistic model includes other variables like age), but glucose and BMI dominate the separation.
When This Analysis Fails
Logistic regression assumes several things. When those assumptions break, the analysis produces garbage. Here's what to watch for:
1. Complete or quasi-complete separation. If a predictor perfectly separates diabetics from non-diabetics (e.g., everyone with glucose above 200 is diabetic, everyone below is not), the maximum likelihood estimate of the coefficient diverges to infinity. The algorithm fails to converge or produces absurdly large odds ratios (OR = 10,000). Solution: use Firth's penalized logistic regression or exact methods.
2. Outliers and influential points. A single patient with extreme biomarker values can pull the regression line. Check Cook's distance and DFBETAs to identify influential points. If removing one patient changes the odds ratios by more than 20%, you have a problem. Solution: investigate the outlier (data entry error?), winsorize extreme values, or use robust regression.
3. Non-linear effects. Logistic regression assumes log-odds are linear in the predictors. If the true relationship is curved (e.g., diabetes risk is flat at low glucose, then spikes above 140), a linear model will miss it. Solution: add polynomial terms (Glucose²), splines, or use generalized additive models (GAM). Test linearity by binning continuous variables and plotting empirical log-odds.
4. Class imbalance. If diabetes prevalence is 1%, your model will achieve 99% accuracy by predicting "non-diabetic" for everyone. Odds ratios remain unbiased, but classification performance is misleading. Solution: report AUC instead of accuracy, use stratified sampling to balance classes, or adjust decision thresholds to optimize sensitivity/specificity trade-offs.
5. Missing data. If 30% of patients are missing insulin measurements, the regression will drop them (listwise deletion) or impute values. Dropping cases loses power and biases results if missingness is related to diabetes status (e.g., diabetics are more likely to have insulin measured). Solution: use multiple imputation, inverse probability weighting, or full information maximum likelihood.
Before you trust the model, run diagnostics: check residual plots, calculate VIF, test linearity, inspect Cook's distance, and validate on a holdout set. If the model performs well on training data but collapses on test data, you overfitted.
From Analysis to Action: Building a Clinical Risk Score
You've run the analysis. Glucose and BMI are your top predictors. The full eight-variable model has an AUC of 0.84, and a three-variable model on glucose, BMI, and age has an AUC of 0.83 (both in-sample). Now what? How do you turn regression coefficients into a clinical tool?
The simplest approach: build a risk score. Multiply each biomarker by its coefficient, sum them up, and add the intercept. That's the log-odds of diabetes. Exponentiate to get the odds, then convert to probability. Because the intercept only makes sense in raw units, refit the three-variable model on the median-filled data with glucose in mg/dL, BMI in kg/m², and age in years:
log-odds = -9.115 + 0.0355·Glucose + 0.0918·BMI + 0.0292·Age
odds = exp(log-odds)
probability = odds / (1 + odds)
For a patient with Glucose = 140, BMI = 32, Age = 45:
log-odds = -9.115 + 0.0355·140 + 0.0918·32 + 0.0292·45 = 0.107
odds = exp(0.107) = 1.11
probability = odds / (1 + odds) = 53%
This patient has a 53% probability of diabetes: a coin flip that warrants follow-up testing. A patient with Glucose = 100, BMI = 25, Age = 30 scores 8%. A patient with Glucose = 180, BMI = 40, Age = 60 scores 94%, and one with Glucose = 90, BMI = 22, Age = 25 scores 4%.
For clinical deployment, you'd validate this score on an external dataset (test on different hospitals, different populations), calibrate it (does predicted probability match observed frequency?), and decide on decision thresholds (what probability triggers action?). The Framingham Diabetes Risk Score and the CDC Prediabetes Screening Test are examples of published risk scores built this way.
How to Interpret Your Results
When you run diabetes risk factors analysis on your own data, here's the checklist:
1. Check sample size. Do you have 10-15 diabetic patients per predictor? If not, reduce predictors or collect more data. Underpowered analyses produce unreliable odds ratios.
2. Examine odds ratios and confidence intervals. Which variables have OR significantly above 1.0? Those are your signal. Which have wide CIs crossing 1.0? Those are uncertain, don't trust them. Rank variables by OR magnitude to prioritize.
3. Evaluate model performance. What's the AUC? Above 0.75 is good. Below 0.70 means you're missing important predictors or have data quality issues. What's the accuracy, sensitivity, and specificity at your chosen threshold? Do they meet clinical requirements?
4. Check for multicollinearity. Look at the correlation matrix and VIF. If two variables correlate above 0.7-0.8, consider dropping one. If VIF is above 5, you have a problem: use regularization or remove correlated variables.
5. Validate externally. Split your data 70/30 (training/test) or use cross-validation. Does the model perform similarly on held-out data? If training AUC is 0.85 and test AUC is 0.65, you overfitted, simplify the model.
6. Compare to univariate distributions. Do the variables with highest odds ratios also show the best univariate separation in the group comparisons? They should. If a variable has a strong univariate effect but a weak odds ratio, it's being explained away by other predictors (multicollinearity or mediation).
7. Check the decision boundary. Does it make clinical sense? If the model predicts diabetes for patients with low glucose and low BMI, something's wrong: check for data errors or model misspecification.
8. Calculate predicted probabilities for reference patients. Plug in typical high-risk and low-risk profiles. Does a patient with glucose=180, BMI=40, age=60 get a probability near 100%? Does a patient with glucose=90, BMI=22, age=25 get a probability near 0%? The three-variable Pima score above gives 94% and 4%. If yours is far from that pattern, the model is poorly calibrated.
Your turn
Bring your own data and the question you actually need answered.
MCP AnalyticsData science by email Send us your data and your question, and we will reply. ds@mcpanalytics.ai
Common Questions
What sample size do I need for reliable diabetes risk factor analysis?
A common rule of thumb for logistic regression with 6-8 biomarkers is at least 10-15 positive cases (diabetic patients) per predictor variable, to limit overfitting; it is not a formal power calculation. If you're testing 8 variables, that's 80-120 diabetic patients minimum. With a 35% diabetes prevalence, you'd need roughly 229-343 total patients. Underpowered analyses will miss real associations and produce unstable odds ratios.
Can I use this analysis to prove a biomarker causes diabetes?
No. Logistic regression on observational data identifies associations, not causation. High glucose is associated with diabetes, but that doesn't prove reducing glucose prevents diabetes (though RCTs have shown it does). To make causal claims, you need randomized controlled trials. This analysis tells you which factors predict risk: use that to design interventions, then test them experimentally.
What AUC (Area Under Curve) indicates a good diabetes prediction model?
For clinical prediction models: AUC 0.70-0.75 is acceptable, 0.75-0.80 is good, 0.80-0.85 is very good, and above 0.85 is excellent. Published diabetes risk scores typically achieve AUC 0.74-0.82 using basic biomarkers (glucose, BMI, age, blood pressure). If your model scores below 0.70, you're missing important predictors or have data quality issues.
How do I interpret odds ratios for continuous variables like glucose?
An odds ratio of 3.17 for glucose (the Pima value in the worked example) means: for every 1-standard-deviation increase in glucose (about 30 mg/dL in that data), the odds of diabetes multiply by 3.17. If baseline odds are 1:2 (33% risk), moving up one SD changes them to 3.17:2 (61% risk). For interpretability, standardize continuous predictors before modeling, then all odds ratios represent the same-sized change and can be directly compared.
Should I remove correlated biomarkers before running logistic regression?
Not necessarily. Multicollinearity (correlation between predictors) inflates standard errors and makes individual coefficients unstable, but doesn't bias predictions. If your goal is prediction (AUC maximization), keep correlated variables. If your goal is understanding independent effects (odds ratios), and two variables correlate above 0.7-0.8, consider dropping one or using regularization (LASSO/ridge). Check variance inflation factors: VIF above 5-10 signals problems.