## Usual Dietary Intakes: SAS Macros for Estimating Ratios of Two Dietary Components that are Consumed Nearly Every Day

The following SAS macros can be used to create a bivariate distribution of usual intake of two dietary components that are consumed nearly every day and to calculate percentiles of the population distribution of the ratio of usual intakes (for example, percent of usual energy intake from saturated fat).

- NLMIXED UNIVARIATE Macro: fits a univariate measurement error model for a single dietary component. The primary purpose of this macro is to provide initial parameter estimates for macro NLMIXED_BIVARIATE.
- NLMIXED BIVARIATE Macro: fits a bivariate measurement error model for two dietary components simultaneously.
- DISTRIB BIVARIATE Macro: uses parameter estimates from the NLMIXED_BIVARIATE macro to create a Monte Carlo distribution of the usual intakes of two dietary components.
- PERCENTILES_SURVEY Macro: uses the distribution generated by the DISTRIB_BIVARIATE macro to calculate the mean, standard deviation and percentiles of the population distribution of usual intake.
- BOXCOX_SURVEY Macro: supplementary program that uses a Box-Cox transformation to transform a variable to approximate normality.

Documentation for these macros is provided in the User’s Guide for Estimating Ratios of Usual Intakes of Dietary Components [PDF - 66 KB]. An example of the application of these macros is described in Freedman et al, 2009.

In addition, NCI has developed sample programs that show how to call the macros to estimate the population distribution of the percent of usual energy from saturated fat (i.e., 100 × {usual saturated fat intake (kcal)} / {usual total energy intake (kcal)}) using data from NHANES 2001-04; the dataset includes the addition of balanced repeated replication (BRR) weights, imputed values for some of the MyPyramid equivalents data, and some variable names that differ from the names used in the original NHANES file.

- Sample programs and output:
- Examples 1-3 [ZIP] illustrate how to fit univariate measurement error models for each of two single dietary components and how to then fit a bivariate measurement error model for two dietary components simultaneously (saturated fat and energy).
- Example 4 [ZIP] illustrates how to generate a Monte Carlo distribution of usual intakes of two dietary components, and to call macro Percentiles_Survey to estimate percentiles of the population distribution of the ratio of usual intakes of two dietary components (percent of usual energy from saturated fat).

- Analytic dataset
- Details of dataset contents [PDF - 29 KB]

Please note that these macros can also be used to estimate ratios of usual intakes of dietary components when one of the components is episodically consumed and the other is consumed every day. A manuscript describing this methodology has not yet been published and we do not recommend using the macros for this purpose at this time.