การวิเคราะห์ข้อมูลแบบสอบถามใน R
Kelly McConville
Assistant Professor of Statistics


$$\hat{y} = a + b x$$
$$\sum_{i=1}^n w_i (y_i -\hat{y}_i)^2$$
mod <- svyglm(HeadCirc ~ AgeMonths, design = NHANES_design)
summary(mod)
svyglm(formula = HeadCirc ~ AgeMonths, design = NHANES_design)
Survey design:
svydesign(data = NHANESraw, strata = ~SDMVSTRA, id = ~SDMVPSU,
nest = TRUE, weights = ~WTMEC4YR)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 38.1376 0.2004 190.3 <2e-16 ***
AgeMonths 1.0708 0.0593 18.1 <2e-16 ***
(Some output omitted)
$$\hat{y} = a + b x$$
$$E(y) = A + B x$$
สมมติฐานหลัก: ขนาดศีรษะและอายุไม่มีความสัมพันธ์เชิงเส้นตรง (กล่าวคือ $B = 0$)
สมมติฐานทางเลือก: ขนาดศีรษะและอายุมีความสัมพันธ์เชิงเส้นตรง (กล่าวคือ $B \neq 0$)
mod <- svyglm(HeadCirc ~ AgeMonths, design = NHANES_design)
summary(mod)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 38.1376 0.2004 190.3 <2e-16 ***
AgeMonths 1.0708 0.0593 18.1 <2e-16 ***
(Some Output Omitted)
ค่าสถิติทดสอบ: $t = \frac{b}{SE}$
การวิเคราะห์ข้อมูลแบบสอบถามใน R