Elements of a sampling design

Phân tích dữ liệu khảo sát bằng R

Kelly McConville

Assistant Professor of Statistics

Simple random sampling

Map of Pennsylvania

Phân tích dữ liệu khảo sát bằng R

Simple random sampling

Map of Pennsylvania with dots representing sampled residents

library(survey)
srs_design <- svydesign(data = paSample,
                        weights = ~wts,
                        fpc = ~N, id = ~1)
Phân tích dữ liệu khảo sát bằng R

Simple random sampling

Map of Pennsylvania with dots representing sampled residents and both Pittburgh and Philadelphia highlighted

Phân tích dữ liệu khảo sát bằng R

Simple random sampling

Map of Pennsylvania with dots representing sampled residents and both Pittburgh and Philadelphia highlighted.  Warren and McKean counties are colored green.

Phân tích dữ liệu khảo sát bằng R

Stratified sampling

Map of Pennsylvania with each county a different color

Phân tích dữ liệu khảo sát bằng R

Stratified sampling

Map of Pennsylvania with each county a different color and dots representing sampled residents

library(survey)
stratified_design <- svydesign(data = paSample, id = ~1, weights = ~wts, 
                               strata = ~county, fpc = ~N)
Phân tích dữ liệu khảo sát bằng R

Cluster sampling

Map of Pennsylvania with each county a different color

Phân tích dữ liệu khảo sát bằng R

Cluster sampling

Map of Pennsylvania with the five sampled counties in black

Phân tích dữ liệu khảo sát bằng R

Cluster sampling

Map of Pennsylvania with the five sampled counties in black and dots representing sampled residents

library(survey)
cluster_design <- svydesign(data = paSample, id = ~county + personid, 
                            fpc = ~N1 + N2, weights = ~wts)
Phân tích dữ liệu khảo sát bằng R

Let's practice!

Phân tích dữ liệu khảo sát bằng R

Preparing Video For Download...