用 R 分析调查数据
Kelly McConville
Assistant Professor of Statistics

原假设:吸烟者与非吸烟者每月不健康天数的均值相同。
备择假设:吸烟者与非吸烟者每月不健康天数的均值不同。
检验统计量:
$$ t = \frac{\bar{y}_s - \bar{y}_n}{SE} $$
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
用 R 分析调查数据