nature.com

A caveat about the use of trigonometric functions in statistical tests of nutritional geometry models

Matters Arising

Open access

Alistair M. Senior,

Caitlin J. Andrews,

Stephen J. Simpson &

David Raubenheimer

Scientific Reports 15, Article number: 8294 (2025) Cite this article

Metrics

The Original Article was published on 08 May 2023

Morimoto1 describes a novel approach for statistically testing experimental data on appetite and nutrient intake. The method calculates the angle between the location of an animal’s nutritional state in multi-dimensional nutrient space relative to an estimate of the target intake. We have explored whether the confidence intervals (CIs) constructed in the method are of appropriate width. We found that the CIs may be either too wide or too narrow depending on the design of, and estimates from, the experiment. We make the case for further theoretical work that can help integrate these factors into the proposed tests.

The experiments discussed here are designed using the geometric framework for nutrition and commonly involve two components2. One step comprises a choice experiment offering free access to 2+ nutritionally complementary foods containing variable ratios of k (typically 2) nutrients. Intake is tracked to define an ‘intake target’ (IT; referred to as ‘t’ in Morimoto’s1 code) in the k-space, which reflects the state the organism’s appetite system has evolved to attain. A second no-choice experiment measures intake when constrained to single foods that are nutritionally imbalanced with respect to the IT. This second step ascertains how regulatory systems interact to govern the over/under consumption of the experimental nutrients of interest, when the IT cannot be reached. Patterns that have been observed in different taxa include: (1) the ‘closest distance rule’ that minimises the Euclidean distance in the k-space to the IT (the point on the imbalanced food vector at 90° to the IT); (2) the ‘equal distance rule’ that equalises the under/over consumption of each nutrient; and (3) defending the intake of one nutrient at the expense of the other (e.g., protein prioritisation)3 (see2 for a review). It is theorized that different patterns of regulation reflect adaptations to foraging strategies4.

Morimoto1 uses Thale’s theorem to propose computing the angle for each individual’s intake coordinate in the no-choice experiment relative to the estimate of the IT coming from the choice experiment. Using these individual angles, one then estimates the mean angle on each food, and constructs a set of 95% CIs. On foods where the CIs exclude 90° one may reject the hypothesis that the closest distance rule is in operation. Morimoto1 computes the mean angles, standard errors (SEs) and CIs for the different foods using a homoscedastic multiple linear regression model (LM), where the individual angular deviances from 90° are the outcome. Morimoto’s1 derivation of a ‘null’ prediction of 90° under the closest distance rule is not in question5,6. However, neither theoretical nor numerical evidence for the propriety of the CIs was presented. We therefore decided to explore the coverage of the CIs using simulation.

We simulated the experiment outlined above in the context of two nutrients, with IT coordinates X and Y. We simulated the choice study by drawing n samples from a pair of random-normal distributions with means X and Y. For the no choice component, we assumed a design of twenty foods with varying ratios. For our purposes, the number of foods is not relevant other than allowing us to clearly map the effects of nutrient ratio on the CIs. We assumed the regulated intake on food d (Xd and Yd) followed the closest distance rule (i.e., minimised distance to X and Y). We then simulated n total intakes on food d from a random-normal distribution with mean Xd + Yd, finding the individual nutrients by multiplying total intake by fraction of each nutrient in d. Finally, we analysed the data using the proposed workflow in Morimoto1. We repeated the simulation 10,000 times recording whether the CIs encompass 90° (nominally 95%). We present an analysis assuming X = 100, Y = 100, n = 25 and homogeneity of variance (standard deviation, SD = 15). We have explored a range of other equally feasible scenarios (e.g., heterogeneity of variance in food intake, imbalanced ITs, and larger/smaller n), and found that the dynamics described below are robust (e.g., Fig. S1 gives results under variable n). All simulations and analyses were performed in R7.

Figure 1A (blue series) shows the coverage of the CIs using the proposed workflow as a function of the log ratio of the nutrients in the experimental foods. For foods with nutrient ratios far from the IT (vertical red line) the CIs are too wide, becoming increasingly narrow as one approaches the IT. For foods with ratios proximal to the IT, the coverage is below 50% (Fig. 1A). This happens because the SE for the angle is some non-linear function of the composition of the experimental food relative to the IT (Fig. 1B), but the LM used to estimate the SEs assumes they are constant. In turn this is because the variance among the n replicates in the angle to the IT will be heterogeneous across foods, even if variance in intake is homogeneous. One can understand why this happens intuitively by considering individuals that are confined to foods close vs far from the IT, but that under/overshoot the regulated coordinate by the same total distance. An individual on a food with a composition proximal to the IT will have an angle more deviant from 90° than an individual on the distal rail, even though they over/under eat to the same degree.

Fig. 1

figure 1

(A) Coverage of 95% confidence intervals for the angle to the intake target (IT) as estimated by a homoscedastic linear model (LM), heteroskedastic LM, and heteroskedastic LM where the IT is known with infinite precision, as a function of the ratio of nutrients in experimental foods, as found by simulation. The black line the nominal rate for coverage. (B) Standard error for the angle to the IT as a function of the ratio of experimental foods as found by simulation and the delta method10. In (A and B) the red line indicates the ratio of the IT. (C) Data from D. melanogaster showing the standard deviation in total nutrient intake, the angle to the experimentally estimated protein to carbohydrate (PC) ratio of the IT (1:4), and a superficially imposed IT (1:1).

We explored these properties of the angle in our Drosophila melanogaster data re-analysed by Morimoto1. Here the estimated protein to carbohydrate (PC) ratio of the IT is 1:48. The first thing to note is that the variance in total intake (c.f. the angle) is heterogeneous among the different foods, peaking on the food with a PC of 1:2 (Fig. 1C, black series). However, the angle has a different pattern where, as indicated by the simulation above, the variance peaks on the food rail that is identical to the IT (Fig. 1C, green series). To demonstrate that calculating the angle causes this pattern of heterogeneity we recalculated the angles using an alternative ‘false IT’, which causes the peak variance to move predictably (e.g., Fig. 1C, orange series, where the IT is assumed to be PC 1:1).

A potential ‘out of the box’ solution here is to analyse the angles using a LM with heteroscedastic errors (sandwich package9). This method helps to minimise the dependence of the CIs on the diet composition, but still generates CIs that are too narrow (grey points, Fig. 1A). Bootstrapping, individual LMs, and using the SEs from the delta method10 also generated CIs that were too narrow (Fig. S1) suggesting a second problem; the SE in the angle is consistently underestimated. In Fig. 1B, for instance, the SEs coming from the delta method are systematically lower than the SE by simulation.

The most likely cause for this underestimate is that the angles are calculated relative to an estimate of the IT, which itself is subject to sampling variability and therefore has a SE that is ‘missing’ from the analysis. We tested this assertion by repeating the simulation using the ‘true’ parameterised value for IT to calculate the angle (i.e., if the IT was known with infinite precision). Here, the heteroscedastic LM consistently generated CIs at the nominal rate (Fig. 1A, orange points). This result shows that theoretical work is needed to derive an estimator of the SE for the angle that factors in the SE of the IT. Until such work is complete, we suggest alternative analyses that will allow the user to reject other hypotheses about nutrient regulation, and which are not dependent on an a priori estimate of the IT.

The equal distance model predicts that the total amount of the nutrients consumed (i.e., in a 2D Cartesian space, x + y) should be constant, whereas the nutrient defence hypotheses predict the intake of specific nutrients should be constant. In the case of the fly data explored above, Welch’s heteroscedastic F-tests11 yield significant effects of diet on total, protein and carbohydrate intake (total F = 48.6, df = 6422.4, p < 0.001, protein F = 355.3, df = 5347.9, p < 0.001, carbohydrate F = 121.4, df = 5346.9, p < 0.001). These results suggest that neither the equal distance, nutrient-defence models wholly explain macronutrient regulation in female adult D. melanogaster.

In summary, we agree with Morimoto1 that angles between intake coordinates in a no-choice study and the target intake coordinate under freedom of choice can be used to test two dimensional models of nutrient regulation. However, more theoretical work is needed on the sampling distribution for such angles before confidence intervals can be constructed for statistical testing. Our simulation reveals that such tests will need to consider: (1) heterogeneity of variance, and (2) the error inherent in the estimate of the intake target.

Data availability

All code and data are available at https://github.com/AlistairMcNairSenior/Nutrig_Sim.

References

Morimoto, J. Nutrigonometry IV: Thales’ theorem to measure the rules of dietary compromise in animals. Sci. Rep. 13(1), 7466 (2023).

ArticleADSCASPubMedPubMed Central Google Scholar

Simpson, S. J. & Raubenheimer, D. The Nature of Nutrition: A Unifying Framework from Animal Adaptations to Human Obesity (Princeton University Press, 2012).

Book Google Scholar

Raubenheimer, D. & Simpson, S. J. Integrating nutrition: A geometric approach. Entomol. Exp. Appl. 91, 67–82 (1999).

Article Google Scholar

Simpson, S. J., Sibly, R. M., Lee, K. P., Behmer, S. T. & Raubenheimer, D. Optimal foraging when regulating intake of multiple nutrients. Anim. Behav. 68(6), 1299–1311 (2004).

Article Google Scholar

Raubenheimer, D. & Simpson, S. J. The geometry of compensatory feeding in the locust. Anim. Behav. 45(5), 953–964 (1993).

Article Google Scholar

Simpson, S. J. & Raubenheimer, D. A multi-level analysis of feeding behaviour: The geometry of nutritional decisions. Philos. Trans. R. Soc. B-Biol. Sci. 342, 381–402 (1993).

ArticleADS Google Scholar

R-Development-Core-Team. R: A language and environemnt for statistical computing. 4.1.0 ed. http://www.r-project.org.; 2021.

Lee, K. P. et al. Lifespan and reproduction in Drosophila: New insights from nutritional geometry. Proc. Natl. Acad. Sci. USA. 105(7), 2498–2503 (2008).

ArticleADSCASPubMedPubMed Central Google Scholar

Zeileis, A. Econometric computing with HC and HAC covariance matrix estimators. J. Stat. Soft 11(10), 1–17 (2004).

Article Google Scholar

Oehlert, G. W. A note on the delta method. Am. Statistician 46(1), 27–29 (1992).

ArticleMathSciNet Google Scholar

Welch, B. L. On the comparison of several mean values: An alternative approach. Biometrika 38(3/4), 330–336 (1951).

ArticleMathSciNet Google Scholar

Download references

Acknowledgements

AMS is supported by a J&D Coffey Fellowship from the University of Sydney. CJA is supported by a Faculty of Science Scholarship from the University of Sydney. SJS and DR acknowledge support from the Australian National Health and Medical Research Council (GNT1149976).

Author information

Authors and Affiliations

Charles Perkins Centre, University of Sydney, Camperdown, NSW, 2006, Australia

Alistair M. Senior, Caitlin J. Andrews, Stephen J. Simpson & David Raubenheimer

School of Life and Environmental Sciences, University of Sydney, Camperdown, NSW, 2006, Australia

Alistair M. Senior, Caitlin J. Andrews, Stephen J. Simpson & David Raubenheimer

Sydney Precision Data Science Centre, University of Sydney, Camperdown, NSW, 2006, Australia

Alistair M. Senior & Caitlin J. Andrews

Contributions

AMS conceptualised the study, performed analyses and wrote the first draft of the manuscript. CJA contributed code to the analysis, the interpretation of the results and the final draft of the manuscript. SJS and DR contributed to the conceptualisation of the study, interpretation of results and the final draft of the manuscript.

Corresponding author

Correspondence to Alistair M. Senior.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Supplementary Figure S1.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Cite this article

Senior, A.M., Andrews, C.J., Simpson, S.J. et al. A caveat about the use of trigonometric functions in statistical tests of nutritional geometry models. Sci Rep 15, 8294 (2025). https://doi.org/10.1038/s41598-025-90267-x

Download citation

Received11 June 2024

Accepted11 February 2025

Published10 March 2025

DOIhttps://doi.org/10.1038/s41598-025-90267-x

Share this article

Anyone you share the following link with will be able to read this content:

Provided by the Springer Nature SharedIt content-sharing initiative

Read full news in source page