National Cancer Institute Home at the National Institutes of Health | www.cancer.gov
Please wait while this form is being loaded....

Usual Dietary Intakes: SAS Macros for Fitting Multivariate Measurement Error Models & Estimating Multivariate Usual Intake Distributions

The following SAS macros can be used to create a multivariate usual intake distribution for multiple dietary components that are consumed nearly every day or episodically. A SAS macro for performing balanced repeated replication (BRR) variance estimation is also included.

  • MULTIVAR_MCMC Macro: fits a multivariate measurement error model that can include episodically consumed dietary components and non-episodically consumed dietary components.
  • STD_COV_BOXCOX24HR_CONDAY_MINAMT Macro: prepares input data for the MULTIVAR_MCMC macro by standardizing continuous covariates, transforming and standardizing reported nonzero amounts (e.g. from 24-hour recalls), and creating other variables needed for the MULTIVAR_MCMC macro.
  • MULTIVAR_DISTRIB Macro: uses parameter estimates from the MULTIVAR_MCMC macro to generate a multivariate Monte Carlo distribution of usual intakes of multiple dietary components.
  • BRR_PVALUE_CI Macro: performs balanced repeated replication (BRR) variance estimation and calculates standard errors, confidence intervals and p-values for user-specified parameters of interest.

Documentation for these macros is provided in the User's Guide: SAS Macros for Fitting Multivariate Measurement Error Models and Estimating Multivariate Usual Intake Distributions (PDF, 157 KB). Applications of these macros are described in Zhang et al., 2011a, Zhang et al., 2011b, and Guenther et al., submitted.

The following sample programs illustrate the use of these macros for creating a multivariate Monte Carlo distribution of usual intakes and subsequent calculation of mean usual HEI–2010 scores using NHANES 2003-04 data for smokers, age 20 and older. The first example (1a) uses a dataset based on NHANES 2003-04 data, with a small set of variables used to illustrate the method, and the second example (1b) uses results stored from the first example. The third example (1c) illustrates balanced repeated replication (BRR) variance estimation and calculations for t-tests comparing mean usual HEI–2010 scores for nonsmokers and smokers, age 20 and older. For convenience, this example (1c) uses an input data set that includes mean usual HEI–2010 scores for nonsmokers and smokers and includes the replicated results needed for BRR variance estimation.

Last Modified: 05 Nov 2013