hei: Individual HEI scores calculation.

Description Usage Arguments Value References Examples

View source: R/hei.R

Description

hei calculates a Health Eating Index (HEI) score for individuals in the National Health and Nutrition Examination Survey (NHANES) studies based on input dietary, demographic and Food Pattern Equivalent Database (FPED) data.

Usage

1
hei(fped, diet, demograph, agethresh = 2, verbose = FALSE)

Arguments

fped

Food Pattern Equivalent Database data; see get_fped

diet

dietary data from NHANES database; see get_diet

demograph

demographic data from NHANES database; see get_demo

agethresh

numeric threshold for age in years of survey participants to be included; any individual less than the value specified will be excluded; defaults to 2

verbose

Boolean indicating whether or not all columns from processed data should be output; default is FALSE designating only the following are included in the returned data.frame:

  • SEQN: Respondent sequence number

  • RIDAGEYR: Best age in years of the sample person at time of HH screening. Individuals 85 and over are topcoded at 85 years of age

  • HEI: Overall Health Eating Index score for the given participant

Value

Object of class data.frame; defaults to only include columns for respondent identifier, age, and overall HEI score of each individual; this can be overridden with the verbose parameter to output all columns of the input data sets as well as 33 columns of calculated data related to HEI scoring and, significantly, a 70th column containing the total HEI score for each participant.

References

https://www.cnpp.usda.gov/healthyeatingindex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
fped0910 <- get_fped("2009/2010", "both")
diet0910 <- get_diet("2009/2010", "both")
demo0910 <- get_demo("2009/2010")
hei(fped0910,diet0910,demo0910)

fped0506 <- get_fped("2005/2006", "first")
diet0506 <- get_diet("2005/2006", "first")
demo0506 <- get_demo("2005/2006")
hei(fped0506,diet0506,demo0506, agethresh = 18)

## End(Not run)

timfolsom/hei documentation built on May 27, 2019, 7:46 a.m.