Inference for quantitative data

Analyzing Survey Data in R

Kelly McConville

Assistant Professor of Statistics

Inference for quantitative data

Bar graph of average number of bad health days for smokers and non-smokers with error bars

Analyzing Survey Data in R

Survey-weighted t-test

Null Hypothesis: The monthly average number of poor health days is the same for smokers and non-smokers.

Alternative Hypothesis: The monthly average number of poor health days is different for smokers and non-smokers.

Test statistic:

$$ t = \frac{\bar{y}_s - \bar{y}_n}{SE} $$

Analyzing Survey Data in R

Survey-weighted t-test

svyttest(formula = DaysPhysHlthBad ~ SmokeNow,
         design = NHANES_design)
Design-based t-test
data:  DaysPhysHlthBad ~ SmokeNow
t = 3.8208, df = 32, p-value = 0.0005778
alternative hypothesis: true difference in mean is not equal to 0
sample estimates:
difference in mean 
          1.042766
Analyzing Survey Data in R

Let's practice!

Analyzing Survey Data in R

Preparing Video For Download...