This section describes how to use SUDAAN to estimate mean nutrient intakes from all sources – that is, from foods, beverages, and supplements – along with standard errors. To illustrate this, consumption of calcium by adults ages 20 and older is used as an example.
Before running any SUDAAN procedure, sort the data by SEQN, using the PROC SORT procedure. In the sample code below, CALCMILK and DEMOOSTS are the datasets that were previously created for this analysis with the appropriate variables of interest. Create a new dataset called CALCTD by merging CALCMILK and DEMOOSTS. When creating the CALCTD dataset, select the variables of interest for your analysis and retain only those individuals with data in the food analysis dataset (CALCMILK). During the MERGE step, create a variable called TOTCALC that is the sum of the 24-hour recall and supplemental calcium average values.
Sort the new CALCTD dataset by strata and PSU. To compute properly weighted estimated means and standard errors of calcium from diet, from supplements and from their combination, use the PROC DESCRIPT procedure in SUDAAN. This procedure includes a required nest statement that identifies the variables for strata and PSU.
In the sample code below, note that the weight variable being used is for the dietary recall Day 1 subsample (WTDRD1). The subgroup statement indicates that the results will be reported by gender (RIAGENDR), which has two “levels” or categories (male and female) and age group (AGEGRP), which has three levels. DR1TCALC, DAILYAVG, and TOTCALC are variables that were previously created to represent the calcium from foods and beverages on Day 1, the daily average calcium intake from supplements, and the sum of those values, respectively (see the full program in Additional Resources to see how these variables were created). The SUBPOPN statement identifies the subset of people that will be included in the analysis. Here, individuals ages 20 and older are included.
|
*-------------------------------------------------------------------------;
proc
sort
data=NH.CALCMILK
out=CALC24(keep=SEQN
WTDRD1 DR1TCALC RIDAGEYR);
proc
sort
data=NH.DEMOOSTS
out=CALCDS(keep=SEQN
SDMVSTRA SDMVPSU RIAGENDR
data
CALCTD;
*-------------------------------------------------------------------------;
proc
sort
data=CALCTD; |
Number of observations read : 9034 Weighted count :286222757
Number of observations skipped : 1088
(WEIGHT variable nonpositive)
Observations in subpopulation : 4448 Weighted count:205284669
Denominator degrees of freedom : 15
For Subpopulation: RIDAGEYR >= 20
for: Variable = Calcium (mg) from food and beverage sources on first 24HR.
--------------------------------------------------------------------------------------------------
| | | |
| Gender - | | Age of subject |
| Adjudicated | | Total | 20-39 | 40-59 | >= 60 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Total | Sample Size | 4448 | 1536 | 1251 | 1661 |
| | Weighted Size | 205284668.86 | 79730527.20 | 76104973.60 | 49449168.07 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 880.13 | 981.71 | 847.34 | 766.81 |
| | SE Mean | 16.72 | 24.34 | 24.30 | 16.25 |
| | Lower 95% Limit | | | | |
| | Mean | 844.49 | 929.83 | 795.55 | 732.17 |
| | Upper 95% Limit | | | | |
| | Mean | 915.77 | 1033.59 | 899.12 | 801.46 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Male | Sample Size | 2135 | 709 | 615 | 811 |
| | Weighted Size | 98664010.22 | 39242416.18 | 37417390.54 | 22004203.49 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 998.36 | 1139.28 | 952.02 | 825.84 |
| | SE Mean | 21.81 | 31.96 | 32.74 | 28.27 |
| | Lower 95% Limit | | | | |
| | Mean | 951.87 | 1071.16 | 882.24 | 765.60 |
| | Upper 95% Limit | | | | |
| | Mean | 1044.85 | 1207.40 | 1021.80 | 886.09 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Female | Sample Size | 2313 | 827 | 636 | 850 |
| | Weighted Size | 106620658.65 | 40488111.01 | 38687583.06 | 27444964.58 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 770.73 | 828.99 | 746.09 | 719.49 |
| | SE Mean | 15.29 | 32.42 | 26.67 | 18.47 |
| | Lower 95% Limit | | | | |
| | Mean | 738.13 | 759.88 | 689.25 | 680.12 |
| | Upper 95% Limit | | | | |
| | Mean | 803.32 | 898.10 | 802.93 | 758.86 |
--------------------------------------------------------------------------------------------------
For Subpopulation: RIDAGEYR >= 20
for: Variable = Calcium (mg) from dietary supplements (Estimated daily average).
--------------------------------------------------------------------------------------------------
| | | |
| Gender - | | Age of subject |
| Adjudicated | | Total | 20-39 | 40-59 | >= 60 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Total | Sample Size | 4438 | 1532 | 1248 | 1658 |
| | Weighted Size | 204506203.51 | 79270770.61 | 75935977.92 | 49299454.97 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 195.76 | 93.14 | 218.48 | 325.76 |
| | SE Mean | 12.01 | 7.27 | 17.43 | 18.38 |
| | Lower 95% Limit | | | | |
| | Mean | 170.15 | 77.65 | 181.32 | 286.58 |
| | Upper 95% Limit | | | | |
| | Mean | 221.36 | 108.63 | 255.63 | 364.94 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Male | Sample Size | 2130 | 708 | 612 | 810 |
| | Weighted Size | 98351278.32 | 39106753.69 | 37248394.86 | 21996129.77 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 126.52 | 57.29 | 155.67 | 200.24 |
| | SE Mean | 9.34 | 6.02 | 15.93 | 15.85 |
| | Lower 95% Limit | | | | |
| | Mean | 106.62 | 44.45 | 121.71 | 166.46 |
| | Upper 95% Limit | | | | |
| | Mean | 146.42 | 70.13 | 189.63 | 234.01 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Female | Sample Size | 2308 | 824 | 636 | 848 |
| | Weighted Size | 106154925.19 | 40164016.93 | 38687583.06 | 27303325.21 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 259.90 | 128.04 | 278.95 | 426.88 |
| | SE Mean | 17.97 | 15.98 | 28.04 | 23.98 |
| | Lower 95% Limit | | | | |
| | Mean | 221.59 | 93.98 | 219.18 | 375.77 |
| | Upper 95% Limit | | | | |
| | Mean | 298.22 | 162.11 | 338.72 | 478.00 |
--------------------------------------------------------------------------------------------------
For Subpopulation: RIDAGEYR >= 20
for: Variable = Estimated total calcium intake on day of first 24HR from all sources.
--------------------------------------------------------------------------------------------------
| | | |
| Gender - | | Age of subject |
| Adjudicated | | Total | 20-39 | 40-59 | >= 60 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Total | Sample Size | 4438 | 1532 | 1248 | 1658 |
| | Weighted Size | 204506203.51 | 79270770.61 | 75935977.92 | 49299454.97 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 1077.86 | 1078.08 | 1067.10 | 1094.06 |
| | SE Mean | 26.09 | 28.44 | 36.16 | 27.03 |
| | Lower 95% Limit | | | | |
| | Mean | 1022.25 | 1017.47 | 990.03 | 1036.44 |
| | Upper 95% Limit | | | | |
| | Mean | 1133.46 | 1138.69 | 1144.17 | 1151.68 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Male | Sample Size | 2130 | 708 | 612 | 810 |
| | Weighted Size | 98351278.32 | 39106753.69 | 37248394.86 | 21996129.77 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 1127.24 | 1199.79 | 1110.78 | 1026.11 |
| | SE Mean | 25.45 | 34.01 | 37.30 | 38.49 |
| | Lower 95% Limit | | | | |
| | Mean | 1072.99 | 1127.30 | 1031.27 | 944.07 |
| | Upper 95% Limit | | | | |
| | Mean | 1181.49 | 1272.29 | 1190.30 | 1108.16 |
--------------------------------------------------------------------------------------------------
| | | | | | |
| Female | Sample Size | 2308 | 824 | 636 | 848 |
| | Weighted Size | 106154925.19 | 40164016.93 | 38687583.06 | 27303325.21 |
| | Total | ************ | ************ | ************ | ************ |
| | Lower 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Upper 95% Limit | | | | |
| | Total | ************ | ************ | ************ | ************ |
| | Mean | 1032.10 | 959.57 | 1025.04 | 1148.80 |
| | SE Mean | 30.75 | 39.13 | 48.35 | 28.29 |
| | Lower 95% Limit | | | | |
| | Mean | 966.55 | 876.16 | 921.98 | 1088.50 |
| | Upper 95% Limit | | | | |
| | Mean | 1097.65 | 1042.98 | 1128.11 | 1209.10 |
-------------------------------------------------------------------------------------------------- |
Highlights from the output include: