Epidemiological analysis with R

Riga Stradins University Workshop, July 2020

Lecturer: Sergio Uribe, Assoc Prof, PhD Riga Stradins University, July 2020 Required packages pacman::p_load( car, broom, tidyverse, ggfortify, mosaic, huxtable, jtools, latex2exp, pubh, sjlabelled, sjPlot, sjmisc ) theme_set(sjPlot::theme_sjplot2(base_size = 10)) theme_update(legend.position = "top") # options('huxtable.knit_print_df' = FALSE) options('huxtable.knit_print_df_theme' = theme_article) options('huxtable.autoformat_number_format' = list(numeric = "%5.2f")) knitr::opts_chunk$set(collapse = TRUE, comment = NA) Epidemiological Descriptive Analysis Onchocerciasis in Sierra Leone. data(Oncho) Oncho %>% head() idmfareaagegrpsexmfloadlesions 1InfectedSavannah20-39Female1No 2InfectedRainforest40+Male3No 3InfectedSavannah40+Female1No 4Not-infectedRainforest20-39Female0No 5Not-infectedSavannah40+Female0No 6Not-infectedRainforest20-39Female0No A two-by-two contingency table: [Read More]

Regression Modelling for Epidemiology

Riga Stradins University Workshop, July 2020

Lecturer: Sergio Uribe, Assoc Prof, PhD Riga Stradins University, July 2020 pacman::p_load( car, broom, tidyverse, ggfortify, mosaic, huxtable, jtools, latex2exp, pubh, sjlabelled, sjPlot, sjmisc ) theme_set(sjPlot::theme_sjplot2(base_size = 10)) theme_update(legend.position = "top") # options('huxtable.knit_print_df' = FALSE) options('huxtable.knit_print_df_theme' = theme_article) options('huxtable.autoformat_number_format' = list(numeric = "%5.2f")) knitr::opts_chunk$set(collapse = TRUE, comment = NA) Regression data(birthwt, package = "MASS") birthwt <- birthwt %>% mutate(smoke = factor(smoke, labels = c("Non-smoker", "Smoker")), race = factor(race, labels = c("White", "African American", "Other"))) %>% var_labels(bwt = 'Birth weight (g)', smoke = 'Smoking status', race = 'Race') birthwt %>% group_by(race, smoke) %>% summarise( n = n(), Mean = mean(bwt, na. [Read More]

Data wrangling and table summaries of case-control studies

A Case-control study compares patients who have a disease or outcome of interest (cases) with patients who do not have the disease or outcome (controls), and looks back retrospectively to compare how frequently the exposure to a risk factor is present in each group to determine the relationship between the risk factor and the disease. Case control studies are observational because no intervention is attempted and no attempt is made to alter the course of the disease. [Read More]