For some reason, there are negative replicate weights in the ACS data. (I don’t know if this is the case with the CPS data.) See also IPUMS.
data acs;
set a.acs;
array temp(*) pwgtp1-pwgtp80;
do i = 1 to dim(temp);
if temp(i) < 0 then temp(i)=0;
end;
run;
proc surveymeans data = indiana varmethod=jackknife;
var agep;
weight pwgtp;
repweights pwgtp1-pwgtp80 / jkcoefs=0.05;
run;
The value for jkcoefs (4/80=0.05) comes from the documentation for variance estimation (chapter 12 of the design methodology):
data acs;
set a.acs;
array temp(*) pwgtp1-pwgtp80;
do i = 1 to dim(temp);
if temp(i) < 0 then temp(i)=0;
end;
run;
proc surveymeans data = indiana varmethod=jackknife;
var agep;
weight pwgtp;
repweights pwgtp1-pwgtp80 / jkcoefs=0.05;
run;
The value for jkcoefs (4/80=0.05) comes from the documentation for variance estimation (chapter 12 of the design methodology):
Update: I believe the following statements will also work but haven't verified this:
proc surveymeans data = indiana varmethod=brr (fay=0.5);
var agep;
weight pwgtp;
repweights pwgtp1-pwgtp80;
run;
proc surveymeans data = indiana varmethod=brr (fay=0.5);
var agep;
weight pwgtp;
repweights pwgtp1-pwgtp80;
run;
No comments:
Post a Comment