This is a preprint.
Dietaryindex: A User-Friendly and Versatile R Package for Standardizing Dietary Pattern Analysis in Epidemiological and Clinical Studies
- PMID: 37609152
- PMCID: PMC10441286
- DOI: 10.1101/2023.08.07.548466
Dietaryindex: A User-Friendly and Versatile R Package for Standardizing Dietary Pattern Analysis in Epidemiological and Clinical Studies
Abstract
Background: Few standardized and open-source tools exist for calculating dietary pattern indexes from dietary intake data in epidemiological and clinical studies. Miscalculations of dietary indexes, with suspected erroneous findings, are occasionally noted in the literature.
Objective: The primary aim is to develop and validate dietaryindex, a user-friendly and versatile R package that standardizes the calculation of dietary indexes.
Methods: Dietaryindex utilizes a two-step process: an initial calculation of serving size for each food and nutrient category, followed by the calculation of individual dietary indexes. It includes generic functions that accept any preprocessed serving sizes of food groups and nutrients, with the standard serving sizes defined according to the methodologies used in well-known prospective cohort studies. For ease of use, dietaryindex also offers one-step functions that directly reference common datasets and tools, including the National Health and Nutrition Examination Survey (NHANES) and Block Food Frequency Questionnaire, eliminating the need for data preprocessing. At least two independent researchers validated the serving size definitions and scoring algorithms of dietaryindex.
Results: Dietaryindex can calculate multiple dietary indexes of high interest in research, including Healthy Eating Index (HEI) - 2020, Alternative Healthy Eating Index 2010, Dietary Approaches to Stop Hypertension Index, Alternate Mediterranean Diet Score, Dietary Inflammatory Index, American Cancer Society 2020 dietary index, and Planetary Health Diet Index from the EAT-Lancet Commission. In our validation process, dietaryindex demonstrated full accuracy (100%) in all generic functions with two-decimal rounding precision in comparison to hand-calculated results. Similarly, using NHANES 2017-2018 data and ASA24 and DHQ3 example data, the HEI2015 outputs from dietaryindex aligned (99.95%-100%) with results using the SAS codes from the National Cancer Institute.
Conclusions: Dietaryindex is a user-friendly, versatile, and validated informatics tool for standardized dietary index calculations. We have open-sourced all the validation files and codes with detailed tutorials on GitHub (https://github.com/jamesjiadazhan/dietaryindex).
Keywords: Dietary Inflammatory Index; Healthy Eating Index-2020; NHANES; R package; dietary index; dietary pattern.
Figures







Similar articles
-
Dietaryindex: a user-friendly and versatile R package for standardizing dietary pattern analysis in epidemiological and clinical studies.Am J Clin Nutr. 2024 Nov;120(5):1165-1174. doi: 10.1016/j.ajcnut.2024.08.021. Epub 2024 Aug 23. Am J Clin Nutr. 2024. PMID: 39182618
-
Associations of healthy eating patterns with biological aging: national health and nutrition examination survey (NHANES) 1999-2018.Nutr J. 2024 Sep 28;23(1):112. doi: 10.1186/s12937-024-01017-0. Nutr J. 2024. PMID: 39342289 Free PMC article.
-
Development of the Penn Healthy Diet screener with reference to adult dietary intake data from the National Health and Nutrition Examination Survey.Nutr J. 2022 Nov 17;21(1):70. doi: 10.1186/s12937-022-00821-w. Nutr J. 2022. PMID: 36384552 Free PMC article.
-
Indicators for the evaluation of diet quality.Nutr Hosp. 2015 Feb 26;31 Suppl 3:128-44. doi: 10.3305/nh.2015.31.sup3.8761. Nutr Hosp. 2015. PMID: 25719781 Review.
-
Diet Quality as Assessed by the Healthy Eating Index, Alternate Healthy Eating Index, Dietary Approaches to Stop Hypertension Score, and Health Outcomes: An Updated Systematic Review and Meta-Analysis of Cohort Studies.J Acad Nutr Diet. 2018 Jan;118(1):74-100.e11. doi: 10.1016/j.jand.2017.08.024. Epub 2017 Oct 27. J Acad Nutr Diet. 2018. PMID: 29111090
Cited by
-
Association between dietary inflammatory index and fecal incontinence in American adults: a cross-sectional study from NHANES 2005-2010.Front Nutr. 2024 Jul 15;11:1364835. doi: 10.3389/fnut.2024.1364835. eCollection 2024. Front Nutr. 2024. PMID: 39077156 Free PMC article.
References
-
- Arnett DK, Blumenthal RS, Albert MA, et al. 2019 ACC/AHA Guideline on the Primary Prevention of Cardiovascular Disease: A Report of the American College of Cardiology/American Heart Association Task Force on Clinical Practice Guidelines. Circulation. 2019;140(11):e596–e646. doi:10.1161/CIR.0000000000000678 - DOI - PMC - PubMed
-
- Determinants and Consequences of Obesity | AJPH | Vol. 106 Issue 9. Accessed June 13, 2023. 10.2105/AJPH.2016.303326 - DOI
Publication types
Grants and funding
LinkOut - more resources
Full Text Sources