Task 3b: How to Estimate Mean Nutrient Intakes from Supplements Using SAS

This section describes how to use SAS to estimate mean nutrient intakes from supplements, along with standard errors.  To illustrate this, consumption of supplemental calcium by females ages 20 and older is used as an example.

 

Step 1: Compute Properly Weighted Estimated Means and Standard Errors

Use the PROC SURVEYMEANS procedure to compute properly weighted estimated means and standard errors. 

In the sample below, the NOBS, MEAN, and STDERR options in the PROC SURVEYMEANS statement request that the number of observations, the estimated mean, and its estimated standard error, respectively, be printed for each analysis variable.  The DOMAIN statement designates the combination of variables required to obtain separate estimates by the cohort of interest (INCOHF20) within each age group (AGEGRP).  INCOHF20 is a variable that has value 1 if the individual is “in the cohort” and zero otherwise.  Here, females ages 20 and older have INCOHF20=1.  As in the SUDAAN example above, the weight variable being used is for the MEC subsample (WTMEC2YR).

 

 

Use SUDAAN to Estimate Mean Intake of Calcium, in Milligrams, from Supplements among Females Ages 20 years and Older

Sample Code

*-------------------------------------------------------------------------;
* Use the PROC SURVEYMEANS procedure in SAS to estimate mean intakes of   ;
* calcium from supplements using complex survey design factors (strata    ;
* and PSU)                                                                ;
*-------------------------------------------------------------------------;

proc surveymeans nobs mean stderr data = DEMOOSTS;
    strata SDMVSTRA;
    cluster SDMVPSU;
    domain INCOHF20*AGEGRP;
    var DAILYAVG;
    weight WTMEC2YR;
    format AGEGRP AGEGRP. ;
run ;

 

Output of Program


                          Data Summary      
                                                               
Number of Strata                                  15 
Number of Clusters                                30  
Number of Observations                         10122  
Number of Observations Used                     9643  
Number of Obs with Nonpositive Weights           479  
Sum of Weights                             286222757   
       
    			Statistics    
                                                 Std Error  
Variable               N            Mean         of Mean    
-------------------------------------------------------- 
DAILYAVG            9618      142.999400        9.643379  
-------------------------------------------------------- 
               
Domain Analysis: Age of subject*INCOHF20  
             
Age of                                                                Std Error    
subject    INCOHF20    Variable               N            Mean         of Mean  
------------------------------------------------------------------------------- 
20-39             0    DAILYAVG             767       62.602567        6.471849 
                  1    DAILYAVG             885      135.856261       17.035929 
40-59             0    DAILYAVG             653      148.634197       17.715262 
                  1    DAILYAVG             679      251.803537       23.644341  
>= 60             0    DAILYAVG             849      197.511972       14.782058   
                  1    DAILYAVG             898      426.392544       26.575240 
-------------------------------------------------------------------------------   
 

 

Highlights from the output include:

 

close window icon Close Window to return to module page.