The SURVEYREG Procedure

Example 116.9 Variance Estimate Using the Jackknife Method

(View the complete code for this example.)

This example uses the stratified sample from the section Getting Started: SURVEYREG Procedure to illustrate how to estimate the variances with replication methods.

As shown in the section Stratified Sampling, the sample is saved in the SAS data set IceCream. The variable Grade that indicates a student’s grade is the stratification variable. The variable Spending contains the dollar amount of each student’s average weekly spending for ice cream. The variable Income specifies the household income, in thousands of dollars. The variable Kids indicates how many children are in a student’s family. The variable Weight contains sampling weights.

In this example, the procedure uses the jackknife method to estimate the variance, saving the replicate weights that PROC SURVEYREG generates in a SAS data set:

title1 'Ice Cream Spending Analysis';
title2 'Use the Jackknife Method to Estimate the Variance';
proc surveyreg data=IceCream
   varmethod=JACKKNIFE(outweights=JKWeights);
   strata Grade;
   class Kids;
   model Spending = Income Kids / solution;
   weight Weight;
run;

The VARMETHOD=JACKKNIFE option requests the procedure to estimate the variance by using the jackknife method. The OUTWEIGHTS=JKWeights option provides a SAS data set named JKWeights that contains the replicate weights used in the computation.

Output 116.9.1 shows the summary of the data and the variance estimation method. There are a total of 40 replicates generated by the procedure.

Output 116.9.1: Variance Estimation Using the Jackknife Method

Ice Cream Spending Analysis
Use the Jackknife Method to Estimate the Variance

The SURVEYREG Procedure
 
Regression Analysis for Dependent Variable Spending

Data Summary
Number of Observations40
Sum of Weights4000.0
Weighted Mean of Spending9.14130
Weighted Sum of Spending36565.2

Design Summary
Number of Strata3

Variance Estimation
MethodJackknife
Number of Replicates40


Output 116.9.2 displays the parameter estimates and their standard errors, as well as the tests of model effects that use the jackknife method.

Output 116.9.2: Variance Estimation Using the Jackknife Method

Tests of Model Effects
EffectNum DFF ValuePr > F
Model4110.48<.0001
Intercept1133.30<.0001
Income1289.16<.0001
Kids30.900.4525

Note:The denominator degrees of freedom for the F tests is 37.


Estimated Regression Coefficients
ParameterEstimateStandard
Error
t ValuePr > |t|
Intercept-26.0868822.58771182-10.08<.0001
Income0.7766990.0456752117.00<.0001
Kids 10.8886311.127992630.790.4358
Kids 21.5457261.255981461.230.2262
Kids 3-0.5268171.42555453-0.370.7138
Kids 40.0000000.00000000..

Note:The degrees of freedom for the t tests is 37.
Matrix X'WX is singular and a generalized inverse was used to solve the normal equations. Estimates are not unique.



Output 116.9.3 prints the first 6 observation in the output data set JKWeights, which contains the replicate weights.

The data set JKWeights contains all the variable in the data set IceCream, in addition to the replicate weights variables named RepWt_1, RepWt_2, ..., RepWt_40.

For example, the first observation (student) from stratum Grade=7 is deleted to create the first replicate. Therefore, stratum Grade=7 is the donor stratum for the first replicate, and the corresponding replicate weights are saved in the variable RepWt_1.

Because the first observation is deleted in the first replicate, RepWt_1=0 for the first observation. For observations from strata other than the donor stratum Grade=7, their replicate weights remain the same as in the variable Weight, while the rest of the observations in stratum Grade=7 are multiplied by the reciprocal of the corresponding jackknife coefficient, 0.95 for the first replicate.

Output 116.9.3: The Jackknife Replicate Weights for the First 6 Observations

The Jackknife Weights for the First 6 Obs

ObsGradeSpendingIncomeKidsProbWeightRepWt_1RepWt_2RepWt_3RepWt_4RepWt_5RepWt_6RepWt_7RepWt_8RepWt_9RepWt_10RepWt_11RepWt_12RepWt_13RepWt_14RepWt_15RepWt_16RepWt_17RepWt_18RepWt_19RepWt_20RepWt_21RepWt_22RepWt_23RepWt_24RepWt_25RepWt_26RepWt_27RepWt_28RepWt_29RepWt_30RepWt_31RepWt_32RepWt_33RepWt_34RepWt_35RepWt_36RepWt_37RepWt_38RepWt_39RepWt_40
1773920.01096591.2000.00096.00091.20091.20096.00096.00096.00091.20091.20096.00096.00091.20091.20096.00096.00096.00091.20091.20091.20091.20091.20091.20096.00096.00096.00091.20091.20091.20096.00096.00096.00096.00091.20091.20091.20096.00091.20091.20096.00096.000
2773810.01096591.20096.0000.00091.20091.20096.00096.00096.00091.20091.20096.00096.00091.20091.20096.00096.00096.00091.20091.20091.20091.20091.20091.20096.00096.00096.00091.20091.20091.20096.00096.00096.00096.00091.20091.20091.20096.00091.20091.20096.00096.000
38124710.008780113.889113.889113.8890.000113.889113.889113.889113.889128.125128.125113.889113.889113.889128.125113.889113.889113.889113.889128.125128.125113.889113.889113.889113.889113.889113.889113.889128.125113.889113.889113.889113.889113.889113.889128.125128.125113.889113.889113.889113.889113.889
49104740.009557104.636104.636104.636104.6360.000104.636104.636104.636104.636104.636104.636104.636115.100104.636104.636104.636104.636115.100104.636104.636115.100115.100115.100104.636104.636104.636115.100104.636115.100104.636104.636104.636104.636115.100104.636104.636104.636115.100115.100104.636104.636
5713440.01096591.20096.00096.00091.20091.2000.00096.00096.00091.20091.20096.00096.00091.20091.20096.00096.00096.00091.20091.20091.20091.20091.20091.20096.00096.00096.00091.20091.20091.20096.00096.00096.00096.00091.20091.20091.20096.00091.20091.20096.00096.000
67104320.01096591.20096.00096.00091.20091.20096.0000.00096.00091.20091.20096.00096.00091.20091.20096.00096.00096.00091.20091.20091.20091.20091.20091.20096.00096.00096.00091.20091.20091.20096.00096.00096.00096.00091.20091.20091.20096.00091.20091.20096.00096.000