# Multivariate NCI Method Utilities

Version: 3.0.1

## Description

Measurement error correction using the multivariate method developed by the 
National Cancer Institute (NCI). Both episodically consumed foods and daily consumed 
nutrients can be handled. Includes functions to fit a measurement error model using 
a Markov Chain Monte Carlo (MCMC) procedure and to generate a dataset of simulated
usual intakes used to represent the distribution of true usual intakes. Also provides
tools for preparing the data for the MCMC algorithm as well as statistical 
summary functions. 

Please cite Zhang, S., et al. (2011) <doi:10.1214/10-AOAS446> for the MCMC algorithm 
and Bhadra, A., et al. (2024) <doi:10.1007/s10985-024-09627-w> for models with
never-consumers for an episodically consumed food. 

Other references are listed.
Truncated Normal Sampler: Robert, C. (1995) <doi:10.1007/BF00143942>.
Bivariate Normal Cumulative Distribution: Johnson, N. and Kotz, S. (1972, ISBN:978-0471443704).
Multivariate Normal Cumulative Distribution: Genz, A. (1992) <doi:10.2307/1390838>.

## Installing the Package

1. Download the package and unzip it to a folder.
2. In SAS, use the following code to load the macros:

   %include "/path/to/package/folder/macros/ncimultivar.sas";

   The /path/to/package/folder part of the path should be replaced with the unzipped folder from Step #1.

## Core Workflow Functions

The following macros form the core workflow of the multivariate NCI method, in order:

	1. %boxcox_survey()
	2. %nci_multivar_preprocessor()
	3. %nci_multivar_mcmc()
	4. %nci_multivar_distrib()
	5. %nci_multivar_summary()