# Chapter 8 Analyzing Complex Survey Data

In this chapter, you will learn:

• Complex survey concepts and terminology; and
• How to incorporate a complex survey design to obtain unbiased estimates of population quantities using the following statistical analysis methods:
• Descriptive statistics;
• Linear regression;
• Binary logistic regression;
• Kaplan-Meier estimate of the survival function;
• Log-rank test to compare survival functions between groups; and
• Cox proportional hazards regression.

This chapter assumes that you have read the chapters on the listed statistical analysis methods. In places, the presentation in this Chapter is brief, only highlighting what is new when analyzing data from a complex survey.

To use the code in this chapter, first load tidyverse and Functions_rmph.R (downloadable from RMPH Resources).

library(tidyverse)
source("Functions_rmph.R")