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

Introduction to R-INLA for Spatial Disease Mapping: A Beginner's Step-by-Step Guide
A comprehensive, beginner-friendly walkthrough demonstrating how to implement Bayesian spatial disease mapping using R-INLA (Integrated Nested Laplace Approximations). This tutorial guides users through the entire epidemiological data pipeline: from importing local administrative shapefiles (using Kenya as a study case) to simulating realistic disease data using Poisson distributions and accounting for background populations. It explicitly breaks down how to construct spatial neighborhood graphs and configure the classic Besag-York-Mollié (BYM) model to split geographic variation into smooth regional patterns and localized noise. Finally, it demonstrates how to extract posterior mean relative risks and visualize public health hot-spots using advanced continuous color styling in ggplot2. Ideal for epidemiologists, data scientists, and students transitioning into spatial statistics.
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.