## Task 3: Key Concepts about Calculating Degrees of Freedom

Due to the complex sample design of NHANES, estimates
computed from the data are more variable than the sample size would
suggest. Therefore, as reviewed in Task 1, it is important to always
calculate the variance, or standard error, that reflects the sampling design
for any estimate obtained from these data.

The variance of an estimate calculated from NHANES data is
related to the number of PSUs. Because the number of PSUs is relatively small
in NHANES, hypothesis tests and confidence intervals should based on a **
t-distribution** rather than the more commonly used z-distribution. The
t-distribution is directly dependent on the number of degrees of freedom, as the
number of degrees of freedom is used to choose the critical value on which the
t-distribution is based.

Degrees of freedom are calculated by subtracting the number of strata from
the number of PSUs, as shown in the equation below. Therefore, a 2-year survey
cycle generally has 15 degrees of freedom, which is calculated by subtracting 15
strata from 30 PSU. However, when data are analyzed on a subgroup of sample
persons, all of whom may not be represented in all strata and PSUs (e.g. Mexican
Americans), the degrees of freedom provided in the output may differ. For
example, SAS Survey procedures, such as PROC SURVEYMEANS, compute the degrees of
freedom as the number of PSUs in the non-empty strata minus the number of
non-empty strata. This means that if your data have empty strata (i.e. no
persons in the population for either PSU), the number of degrees of freedom will
increase. This is incorrect and SAS is currently working on correcting this
problem. In the meantime, you can use SAS macros that have been developed to
get around this issue. Please see the Continuous NHANES tutorial for more
information.

#### Equation for Degrees of Freedom

The degrees of freedom are inversely
proportional to relative standard of error and proportional to the reliability of an estimated standard error. As the number
of degrees of freedom increases, the relative standard error decreases and the
reliability of the estimate increases. The NHANES guidelines recommended a
relative standard error of at most 30%. This corresponds to at least 22 degrees
of freedom.

For more information on degrees of freedom, please visit “Module 12: Variance Estimation” of the Continuous NHANES Tutorial.