The SURVEYPHREG Procedure

Degrees of Freedom

PROC SURVEYPHREG uses the degrees of freedom of the variance estimator to obtain t confidence limits and Wald-type F tests. The procedure computes the degrees of freedom based on the variance estimation method, the sample design, and the number of estimable parameters. Alternatively, you can specify the degrees of freedom by using the DF= option in the MODEL statement. This section describes how PROC SURVEYPHREG computes different values of the degrees of freedom based on the variance estimation method and the sample design. For more information about how degrees of freedom depend on the number of estimable parameters and the DF= option in the MODEL statement, see the section Hypothesis Tests, Confidence Intervals, and Residuals.

For Taylor series variance estimation, PROC SURVEYPHREG calculates the degrees of freedom (df) as the number of clusters minus the number of strata. If the CLUSTER statement is not specified, then the procedure treats each observation as a cluster. If the STRATA statement is not specified, then the procedure assumes that all observations are in the same stratum. These numbers are based on the observations that are included in the analysis. These numbers do not count observations that are excluded from the analysis because they have missing values. For more information, see the section Missing Values. If you specify the MISSING option in the CLASS statement, missing values are treated as valid nonmissing levels and are included in computing the degrees of freedom. If you specify the NOMCAR option for Taylor series variance estimation, observations that have missing values of the analysis variables are included in computing the degrees of freedom.

If you provide replicate weights by using the REPWEIGHTS statement, the degrees of freedom are equal to the number of replicates used, which is the number of REPWEIGHTS variables that provide replicate estimates. Alternatively, you can specify DF= ALLREPS in the MODEL statement to specify that df equals the number of replicates.

For BRR variance estimation (when you do not use the REPWEIGHTS statement), PROC SURVEYPHREG calculates the degrees of freedom as the number of strata. The procedure bases the number of strata on all valid observations in the data set. If some replicate samples are not usable, in the sense that they cannot be used for parameter estimation because of factors such as nonconvergence or inestimability, then df equals the minimum of the number of strata and the number of replicates used. Alternatively, you can specify DF= ALLREPS in the MODEL statement to specify that df equals the number of strata.

For jackknife variance estimation (when you do not use the REPWEIGHTS statement), PROC SURVEYPHREG calculates the degrees of freedom as the number of clusters minus the number of strata. If you do not specify the CLUSTER statement, then the procedure treats each observation as a cluster. If you do not specify the STRATA statement, then the procedure assumes that all observations are in the same stratum. For jackknife variance estimation, PROC SURVEYPHREG bases the number of strata and clusters on all valid observations in the data set. If some replicate samples are not usable, in the sense that they cannot be used for parameter estimation because of factors such as nonconvergence or inestimability, then df equals the number of clusters (or observations if no CLUSTER statement is specified) minus the number of strata (or 1 if no STRATA statement is specified) minus the number of replicate samples that are not used. Alternatively, you can specify DF= ALLREPS in the MODEL statement to specify that df equals the number of clusters minus the number of strata.