Task 2a: How to Identify Important Food Group Sources of Nutrients Using SUDAAN

This section describes how to use SUDAAN to identify food group sources of nutrients along with standard errors.  To illustrate this, food sources of calcium are identified for the whole population, ages 2 and older, for 2001-2004.   In this example, a simplistic food grouping scheme based on the first digit of the USDA  food codes, was used for illustrative purposes.

 

Step 1: Create Folder

Create a folder to save the dataset, list the contents of each dataset, and create a dataset comprised of 4 years of data. (Program not shown.  See the full program in Additional Resources for more information.)

 

Step 2: Sort and Merge Datasets

Sort and then merge the demographic and individual food intake datasets.  Create new variables, as needed.  Note that the food groups are simply characterized by first digit of individual food code: milk and milk products; meat, poultry, fish and mixtures; eggs; legumes, nuts and seeds; grain products; fruits; vegetables; fats, oils and salad dressings; and sugar, sweeteners and beverages.  (Program not shown.  See the full program in Additional Resources for more information.)

 

Step 3: Sort the data

Sort the data.  All data must be sorted first before analysis in SUDAAN.

 

Step 4: Calculate the Weighted Contribution of Calcium from Each Food Group

Calculate the weighted contribution of calcium from each food group using the PROC CROSSTAB procedure in SUDAAN.

 

 

Identifying Food Group Sources of Calcium

Sample Code

*-------------------------------------------------------------------------;
* Use the PROC SORT procedure to sort the data.  Data must always be      ;
* sorted first when using SUDAAN.                                         ;
*                                                                         ;
* This example uses the CROSSTAB procedure in SUDAAN to calculate the     ;
* weighted contribution of calcium from multiple food groups.  This is an ;
* unconventional use of PROC CROSSTAB because this procedure is usually   ;
* applied to a categorical variable to obtain fractions of the population ;
* falling into each category.  However, in this example, the sample weight;
* is multiplied by the individual calcium intake to obtain the variable   ;
* WTD_CALC.  When this new variable is used as the WEIGHT variable, it    ;
* produces fractions of the population calcium intake falling into each   ;
* category of FOODGRP, which is the analysis variable in this example     ;
* specified in the TABLES statement.                                      ;
*                                                                         ;
* In this example, the domain analysis is handled by using a combination  ;
* of the SUBPOPN and SUBGROUP statements to only print out the desired    ;
* statistics (i.e. where INCOH=1)                                         ;
*-------------------------------------------------------------------------;

proc sort data =FDSRC;
    by SDMVSTRA SDMVPSU;
run ;

proc crosstab data=FDSRC;
    nest SDMVSTRA SDMVPSU;
    weight WTD_CALC;
    subgroup FOODGRP;                       
    levels 9 ;
    tables FOODGRP;
    subpopn INCOH=1 ;
    print nsum totper setot;
    rtitle
        "Percent of total calcium by food group, using PROC CROSSTAB"
run ;

proc sort data =DTTOT;
      by SDMVSTRA SDMVPSU;
run ;

 

Output of Program


                                  S U D A A N                                  
            Software for the Statistical Analysis of Correlated Data           
           Copyright        Research Triangle Institute    February 2005       
                                  Release 9.0.1                                
                                                                               
                                                                               
Number of observations read    : 254848    Weighted count :256453786453        
Number of observations skipped :  19320                                        
(WEIGHT variable nonpositive)                                                  
Observations in subpopulation  : 236318    Weighted count:249765901813         
Denominator degrees of freedom :     30                                        
                                                                               
                                                                             
Variance Estimation Method: Taylor Series (WR)                                 
For Subpopulation: INCOH = 1                                                   
Percent of total calcium by food group, using PROC CROSSTAB                    
by: Broad food grp based on 1st digit of USDA food code.                       
                                                                               
---------------------------------------------------------------------------------  
|                |                                                               |
|                | Broad food grp based on 1st                                   | 
|                | digit of USDA food code                                       | 
|                | Total    | Milk &   | Meat,    | Eggs   | Legumes, | Grain    | 
|                |          | Milk     | Poultry, |        | Nuts and | Products | 
|                |          | Products | Fish &   |        | Seeds    |          | 
|                |          |          | Mixtures |        |          |          |
---------------------------------------------------------------------------------  
|                |                                                               |
| Sample Size    |   236318 |    31659 |    28128 |   3880 |     5863 |    58822 |
| Tot Percent    |   100.00 |    46.37 |     7.11 |   1.86 |     1.65 |    29.44 |
| SE Tot Percent |     0.00 |     0.42 |     0.22 |   0.07 |     0.07 |     0.37 |
---------------------------------------------------------------------------------      
                                                          
---------------------------------------------------------------       
|                  |                                           |
|                  | Broad food grp based on 1st               |
|                  | digit of USDA food code                   |
|                  | Fruits   | Vegetab- | Fats,    | Sugar,   |  
|                  |          | les      | Oils &   | Sweeten- |
|                  |          |          | Salad    | ers &    | 
|                  |          |          | Dressin- | Beverag- | 
|                  |          |          | gs       | es       |
---------------------------------------------------------------   
|                  |          |          |          |          |
| Sample Size      |    18936 |    39747 |     8823 |    40460 |
| Tot Percent      |     3.21 |     4.82 |     0.32 |     5.22 |
| SE Tot Percent   |     0.12 |     0.13 |     0.02 |     0.13 |
---------------------------------------------------------------     
  

Highlights from the output include:

 

 

close window icon Close Window to return to module page.