Blog
Worked analyses with the R script and the output shown.
Confounding variables and how adjustment works
What a confounding variable is, how adjusting for one changes an odds ratio, and which variables to leave out of the model, worked on the birthwt data.
October 23, 2026, Regression models, 13 min read
Correlation matrix in R with p-values and intervals
Build a correlation matrix in R with a p-value and confidence interval for every pair, adjust for testing many pairs at once, and read the table honestly.
October 23, 2026, Regression models, 11 min read
Correlation vs causation in research reports
Why a strong correlation does not show cause: a seeded simulation where a third variable drives two measures, and a checklist of what a design needs.
October 23, 2026, Regression models, 9 min read
Cox regression in R: coxph() with the exact script
Fit a Cox model in R with coxph() on the survival lung data, read the output line by line, run cox.zph for proportional hazards, and see the script.
October 23, 2026, Survival analysis, 14 min read
How to interpret a hazard ratio in Cox regression
What a hazard ratio of 2 does and does not mean, how the reference group and the unit change it, and how to report it with a confidence interval.
October 23, 2026, Survival analysis, 3 min read
Inter-rater reliability: kappa and alternatives
Cohen's kappa computed by hand and in R on a two-rater table, weighted kappa for ordered grades, and why high agreement can still give a low kappa.
October 23, 2026, Agreement and diagnostic accuracy, 13 min read
Multicollinearity and VIF: a worked example in R
When correlated predictors matter: how to compute and read the variance inflation factor, what it does to confidence intervals, and when to leave it alone.
October 23, 2026, Regression models, 7 min read
Regression to the mean in pre-post studies
Why extreme baseline scores drift back toward the average with no treatment at all, shown in a seeded simulation, and how a control group and ANCOVA remove it.
October 23, 2026, Statistics for a thesis or dissertation, 5 min read
Residual standard error: how to read it in R
Where the residual standard error sits in R's lm() output, what it means in your outcome's units, and how to read it alongside the residual plot.
October 23, 2026, Regression models, 10 min read
Sensitivity vs specificity in a diagnostic study
How sensitivity, specificity and predictive values are estimated from a 2x2 table, why prevalence moves the predictive values, and how to report intervals.
October 23, 2026, Agreement and diagnostic accuracy, 11 min read