R strata()

1 개요[ | ]

R strata()
  • "Stratified Sampling"
method
srswor (기본값) simple random sampling without replacement → 비복원 단순랜덤샘플링
srswr simple random sampling with replacement → 복원 단순랜덤샘플링
poisson Poisson sampling → 포아송 샘플링
systematic systematic sampling → 체계적 샘플링

2 예시[ | ]

R
Reload
Copy
summary(warpbreaks)
Loading
Copy
table(warpbreaks$wool,warpbreaks$tension)
Loading
Copy
library(sampling)
s <- strata(warpbreaks,c("wool","tension"),size=c(2,2,2,2,2,2),method="srswor")
s
Loading
Copy
getdata(warpbreaks, s)
Loading

3 같이 보기[ | ]

4 참고[ | ]