Examples of Using Stata v110 with JRR replicate weights Provided in the NHANES 1999-2000 data set This document is designed to illustrate comparisons of methods to use JRR replicate weights sometimes provided by NCHS and other distributors of public release data sets The NHANES 1999-2000 provided JRR replicate weights along with masked strata and PSU variables Demonstrated is how to use the JRR replicate weights directly in Stata along with a comparison of results using both the Taylor Series linearization approach and use of the JRR option in Stata where the replicates are developed by the Stata program Stata Do File: ******************************************************************************************************************** * Use of JRR replicate weights with NHANES 1999-2000 dataset * Comparison to Linearization and JRR with "Masked Weights" ******************************************************************************************************************** * read in dataset with demo variables and blood pressure readings use "F:\brahms\summerclasses\complexanalysis2007\demo_bpx_nhanes9900dta", clear * do surveyset with 52 replicate weights svyset _n [pweight=wtint2yr], jkrweight(wtmrep01 wtmrep02 wtmrep03 wtmrep04 wtmrep05 wtmrep06 wtmrep07 wtmrep08 wtmrep09 /// wtmrep10 wtmrep11 wtmrep12 wtmrep13 wtmrep14 wtmrep15 wtmrep16 wtmrep17 wtmrep18 wtmrep19 /// wtmrep20 wtmrep21 wtmrep22 wtmrep23 wtmrep24 wtmrep25 wtmrep26 wtmrep27 wtmrep28 wtmrep29 /// wtmrep30 wtmrep31 wtmrep32 wtmrep33 wtmrep34 wtmrep35 wtmrep36 wtmrep37 wtmrep38 wtmrep39 /// wtmrep40 wtmrep41 wtmrep42 wtmrep43 wtmrep44 wtmrep45 wtmrep46 wtmrep47 wtmrep48 wtmrep49 /// wtmrep50 wtmrep51 wtmrep52) vce(linearized) svydes * run analyses using the JRR replicate weights provided by project staff svy, vce(jackknife): mean bpxdi1 * note that riagendr =1 = male and =2= female svy, vce(jackknife): tabulate riagendr, cell se svy, vce(jackknife): regress bpxdi1 iriagendr * reset svy using masked stratum and psu variables svyset sdmvpsu [pweight=wtint2yr], strata(sdmvstra) vce(linearized) svydes * use of linearized approach svy, vce(linearized): mean bpxdi1 svy, vce(linearized): regress bpxdi1 iriagendr * use of JRR approach with strata and psu variables and Stata creates the JRR replicates for us svy, vce(jackknife): mean bpxdi1 svy, vce(jackknife): regress bpxdi1 iriagendr
Output : * read in dataset with demo variables and blood pressure readings use "F:\brahms\summerclasses\complexanalysis2007\demo_bpx_nhanes9900dta", clear * do surveyset with 52 replicate weights svyset _n [pweight=wtint2yr], jkrweight(wtmrep01 wtmrep02 wtmrep03 wtmrep04 wtmrep05 wtmrep06 wtmrep07 wtmrep08 wtmrep09 /// > wtmrep10 wtmrep11 wtmrep12 wtmrep13 wtmrep14 wtmrep15 wtmrep16 wtmrep17 wtmrep18 wtmrep19 /// > wtmrep20 wtmrep21 wtmrep22 wtmrep23 wtmrep24 wtmrep25 wtmrep26 wtmrep27 wtmrep28 wtmrep29 /// > wtmrep30 wtmrep31 wtmrep32 wtmrep33 wtmrep34 wtmrep35 wtmrep36 wtmrep37 wtmrep38 wtmrep39 /// > wtmrep40 wtmrep41 wtmrep42 wtmrep43 wtmrep44 wtmrep45 wtmrep46 wtmrep47 wtmrep48 wtmrep49 /// > wtmrep50 wtmrep51 wtmrep52) vce(linearized) jkrweight: wtmrep01 wtmrep02 wtmrep03 wtmrep04 wtmrep05 wtmrep06 wtmrep07 wtmrep08 wtmrep09 wtmrep10 wtmrep11 wtmrep12 wtmrep13 wtmrep14 wtmrep15 wtmrep16 wtmrep17 wtmrep18 wtmrep19 wtmrep20 wtmrep21 wtmrep22 wtmrep23 wtmrep24 wtmrep25 wtmrep26 wtmrep27 wtmrep28 wtmrep29 wtmrep30 wtmrep31 wtmrep32 wtmrep33 wtmrep34 wtmrep35 wtmrep36 wtmrep37 wtmrep38 wtmrep39 wtmrep40 wtmrep41 wtmrep42 wtmrep43 wtmrep44 wtmrep45 wtmrep46 wtmrep47 wtmrep48 wtmrep49 wtmrep50 wtmrep51 wtmrep52 Strata 1: <one> SU 1: <observations> svydes Survey: Describing stage 1 sampling units jkrweight: wtmrep01 wtmrep02 wtmrep03 wtmrep04 wtmrep05 wtmrep06 wtmrep07 wtmrep08 wtmrep09 wtmrep10 wtmrep11 wtmrep12 wtmrep13 wtmrep14 wtmrep15 wtmrep16 wtmrep17 wtmrep18 wtmrep19 wtmrep20 wtmrep21 wtmrep22 wtmrep23 wtmrep24 wtmrep25 wtmrep26 wtmrep27 wtmrep28 wtmrep29 wtmrep30 wtmrep31 wtmrep32 wtmrep33 wtmrep34 wtmrep35 wtmrep36 wtmrep37 wtmrep38 wtmrep39 wtmrep40 wtmrep41 wtmrep42 wtmrep43 wtmrep44 wtmrep45 wtmrep46 wtmrep47 wtmrep48 wtmrep49 wtmrep50 wtmrep51 wtmrep52 Strata 1: <one> SU 1: <observations> #Obs per Unit ---------------------------- Stratum #Units #Obs min mean max 1 9282 9282 1 10 1 1 9282 9282 1 10 1
* run analyses using the JRR replicate weights provided by project staff svy, vce(jackknife): mean bpxdi1 Jackknife replications (52) 50 Number of strata = 1 Number of obs = 6457 Population size = 194157303 Mean Std Err [95% Conf Interval] bpxdi1 7022135 5179801 6918146 7126123 * note that riagendr =1 = male and =2= female svy, vce(jackknife): tabulate riagendr, cell se (running tabulate on estimation sample) Number of strata = 1 Number of obs = 9282 Population size = 250273131 ------------------------------------ gender - adjudicat ed proportions se ----------+------------------------- 1 4915 0014 2 5085 0014 Total 1 ------------------------------------ Key: proportions = cell proportions se = jackknife standard errors of cell proportions svy, vce(jackknife): regress bpxdi1 iriagendr Jackknife replications (52) 50 Number of strata = 1 Number of obs = 6457 Population size = 194157303 F( 1, 51) = 7951 Prob > F = 00000 R-squared = 00127 bpxdi1 Coef Std Err t P> t [95% Conf Interval] -------------+-- 2riagendr -3050762 3421358-892 0000-3737628 -2363895 _cons 7177298 5124574 14006 0000 7074418 7280178
* reset svy using masked stratum and psu variables svyset sdmvpsu [pweight=wtint2yr], strata(sdmvstra) vce(linearized) Strata 1: sdmvstra SU 1: sdmvpsu svydes Survey: Describing stage 1 sampling units Strata 1: sdmvstra SU 1: sdmvpsu #Obs per Unit ---------------------------- Stratum #Units #Obs min mean max 1 3 983 287 3277 355 2 2 650 272 3250 378 3 2 759 370 3795 389 4 2 812 337 4060 475 5 2 700 346 3500 354 6 2 689 326 3445 363 7 2 798 361 3990 437 8 2 685 291 3425 394 9 2 644 315 3220 329 10 2 574 266 2870 308 11 2 683 300 3415 383 12 2 763 365 3815 398 13 2 542 268 2710 274 13 27 9282 266 3438 475 * use of linearized approach svy, vce(linearized): mean bpxdi1 Linearized Mean Std Err [95% Conf Interval] bpxdi1 7022135 4736565 6920545 7123724
svy, vce(linearized): regress bpxdi1 iriagendr F( 1, 14) = 4162 Prob > F = 00000 R-squared = 00127 Linearized bpxdi1 Coef Std Err t P> t [95% Conf Interval] -------------+-- 2riagendr -3050762 4728907-645 0000-4065011 -2036512 _cons 7177298 4612186 15562 0000 7078377 727622 * use of JRR approach with strata and psu variables and Stata creates the JRR replicates for us svy, vce(jackknife): mean bpxdi1 Jackknife replications (27) Replications = 27 Mean Std Err [95% Conf Interval] bpxdi1 7022135 4746321 6920336 7123933 svy, vce(jackknife): regress bpxdi1 iriagendr Jackknife replications (27) Replications = 27 F( 1, 14) = 4155 Prob > F = 00000 R-squared = 00127 bpxdi1 Coef Std Err t P> t [95% Conf Interval] -------------+-- 2riagendr -3050762 4732821-645 0000-4065851 -2035673 _cons 7177298 4627265 15511 0000 7078053 7276543