Hello,
I ran across this error message ("too many weights") after drawing a stratified random sample from a large, administrative dataset (N=803903). The problem surfaces after trying to svyset the data. This is pretty straightforward sampling. Does anyone out there see a quick solution or an obvous source of error? Thanks.
Here's the syntax, which specifies two strata:
use "C:\dataset.dta", clear
gen strata=1
replace strata=2 if variable ==1
sort strata
by strata: count
set seed 354354
by strata: sample 1
sort strata
by strata: count
gen pw=387895/3879 if strata==1
replace pw=416008/4160 if strata==2
gen fpc = 387895 if strata==1
replace fpc = 416008 if strata==1
svyset [pweight=pw], strata[strata] fpc(fpc)
Error message: "too many weights"
r(198)
I ran across this error message ("too many weights") after drawing a stratified random sample from a large, administrative dataset (N=803903). The problem surfaces after trying to svyset the data. This is pretty straightforward sampling. Does anyone out there see a quick solution or an obvous source of error? Thanks.
Here's the syntax, which specifies two strata:
use "C:\dataset.dta", clear
gen strata=1
replace strata=2 if variable ==1
sort strata
by strata: count
set seed 354354
by strata: sample 1
sort strata
by strata: count
gen pw=387895/3879 if strata==1
replace pw=416008/4160 if strata==2
gen fpc = 387895 if strata==1
replace fpc = 416008 if strata==1
svyset [pweight=pw], strata[strata] fpc(fpc)
Error message: "too many weights"
r(198)
Comment