RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post
gravatar

wanjiruthm

Ruth Mwangi

Recently Published

A Beginner’s Guide to Understanding Relative Risk
This tutorial provides a clear, step-by-step introduction to calculating and interpreting Relative Risk (RR) using R. Designed for biostatistics beginners and epidemiologists, the guide walks through three distinct methodologies: manual extraction from a 2 × 2 table, automated estimation using the epitools package, and adjusted analysis controlling for clinical confounders using log-binomial regression models (glm).
Understanding Odds Ratios: A Beginner-Friendly Guide in R
This document provides a clear, step-by-step introduction to calculating and interpreting Odds Ratios (OR) using R. Using a practical health science scenario (Smoking and Lung Cancer), it demonstrates how to build a 2x2 contingency table, extract individual group odds, and replicate the results using both the epitools package and logistic regression (glm).It is specifically designed for beginners, featuring plain-English explanations of data framing, factor levels, and how to avoid common coding layout traps like inverted risk estimates.