Task 2: How to Evaluate the Effects of Covariates on Usual Intake of a Single Episodically-Consumed Dietary Constituent

In this example, the relationship between race/ethnicity and age on dairy intake in adult women (older than age 50 years) is modeled.

This example uses the demoadv dataset (download at Sample Code and Datasets).  The variables w0304_0 to w0304_16 are the weights (dietary weights and Balanced Repeated Replication [BRR] weights) used in the analysis of 2003-2004 dietary data that requires the use of BRR to calculate standard errors. The model is run 17 times, including 16 runs using BRR (see Module 18 "Model Usual Intake Using Dietary Recall Data", task 4 for more information).  BRR uses weights w0304_1 to w0304_16.

Info iconIMPORTANT NOTE

Note: if 4 years of NHANES data are used, 32 BRR runs are required.

 

A SAS macro is a useful technique for rerunning a block of code when the analyst only wants to change a few variables; the macro BRR192 is created and called in this example. The BRR192 macro calls the MIXTRAN macro, and calculates BRR standard errors of the parameter estimates.  The MIXTRAN macro obtains preliminary estimates for the values of the parameters in the model, and then fits the model using PROC NLMIXED. It also produces summary reports of the model fit.

Recall that modeling the complex survey structure of NHANES requires procedures that account for both differential weighting of individuals and the correlation among sample persons within a cluster.  The SAS procedure NLMIXED can account for differential weighting by using the replicate statement.  The use of BRR to calculate standard errors accounts for the correlation among sample persons in a cluster.  Therefore, NLMIXED (or any SAS procedure that incorporates differential weighting) may be used with BRR to produce standard errors that are suitable for NHANES data without using specialized survey procedures.

The MIXTRAN macro used in this example was downloaded from the NCI website.  Version 1.1 of the macro was used.  We recommend that you check this website for macro updates before starting any analysis.  Additional details regarding the macro and additional examples also may be found on the website and in the users’ guide.

 

Step 1: Create a dataset so that each row corresponds to a single person day and define indicator variables if necessary

First, select only those people with dietary data by selecting those without missing BRR weights.

data demoadv;

set nh.demoadv;

if w0304_0 ne . ;  

run ;

 

The variables d_milk_d1 and d_milk_d2  are derived variables representing total milk consumed (cup equivalents) on days 1 and 2 respectively using My Pyramid Equivalences (see Module 4 "Resources for Dietary Data Analysis" and Module 9 "Review Data and Create New Variables", Task 4