Nutrient tracking experiment

forestglip

Moderator
Staff member
About a month ago I started eating a paleo, whole foods type diet. Basically, unprocessed plants and animals apart from cooking. I'm logging the weight of every food I eat in an app called Cronometer. For most packaged or processed foods, it has the nutrition information from the label - so just the basics seen on most US labels: macronutrients and around five or six micronutrients.

But the cool thing is that the app also has entries pulled from the University of Minnesota NCC Food and Nutrient Database which has detailed micronutrient data for thousands of "foundational" foods, as in most fruits, vegetables, nuts, meats you would typically find at a grocery store - around 70-80 nutrients for most foods. (Also has a good number of brand name and restaurant foods.)

Starting three days ago, I decided to only eat foods which have this comprehensive nutrition information. Which is basically most of the foods I was already eating, but I'm just going to exclude bags of mixed frozen vegetables from now on, and buy them packaged separately.

Here's two days ago, an example of the foods I eat:
upload_2024-10-1_21-45-11.png

And an example of micronutrient details. This is for 629 grams of baked potato:
Screenshot 2024-10-01 at 21-43-29 Cronometer(1).png

So the experiment. I'm going to track the nutrition data for probably at least six months.

First hypothesis I've come up with: Amounts of some micronutrients will inversely correlate with calories eaten the same day or the next day. In other words, that the intake of certain micronutrients dictates my hunger to some extent. If I am eating very little of something, for example copper, my body would make me more hungry in an attempt to increase my intake of copper, and vice versa.

Second hypothesis, but which I can't yet start: Amounts of some micronutrients will correlate to my physical activity and body position.

Chris Armstrong of OMF, in another thread, posted that they might use a device called an activPAL for tracking body position in future studies. It is stuck to the thigh and tracks its orientation to determine the wearer's position. If the sensor/thigh is vertical, the person is standing. Horizontal - the person is sitting or lying down. And I think it tracks if the person is walking as well.

I really want some kind of device like this. My main symptoms are related to physical and mental energy. I can't think of any objective measurement for mental energy (edit: potentially I could do some cognitive tests, but they require significant energy to do on a consistent basis), but this seems like a fairly accurate indicator of how much physical energy I have. I definitely spend more time lying down the more tired I am. Steps are kind of a proxy for physical energy, and I can track that with my phone, but for me I pretty much only walk for things I have to do: grocery stores, work, cooking. It doesn't vary too much based on my energy. But the amount of time I spend sitting up or standing is more based on how energetic I feel.

I don't think any devices like this are available for consumer use, at least accurate ones. activPAL is made for researchers. I tried messaging them about the possibility of purchasing a single device for personal use, but they didn't respond.

So I'm planning to try to make my own. I still have to educate myself more on some of the required technologies, but the basic concept isn't too complicated. It'll be a microcontroller with an accelerometer on my thigh, and a wire will go up to another accelerometer on my chest. Each accelerometer provides its own physical orientation in three axes. The chest one is so that I can also discriminate between sitting and lying down.

The microcontroller, basically a tiny computer, will continuously take that combined data, do a little math to get my body's position, and log the timestamped position in an attached SD card so that I can analyze it later.

I also want it to track steps, including whether it was a step on level ground, going up a stair, or down a stair. I'm guessing this will require some machine learning on the accelerometer data. I'm not sure if it's too hard a task for me, but it doesn't seem like it should be. I think the algorithms for step counting in smart watches can be complicated, but the wrist is also a hard place to accurately track what the legs are doing. I think it might be easier if the device is on the thigh.

This device might take a while to build though. I'm doing short bursts of learning in each technology I'll require: electronics, machine learning, 3D design (for the case for the device), and a couple other things. Cycling through each subject, so around 30 minutes on electronics one day, 30 minutes on machine learning the next, etc. Doesn't feel as overwhelming as doing the same thing every day.

Anyway, if anyone has any thoughts, or suggestions for how I could improve these ideas, I'm all ears.
 
Last edited:
@forestglip This is really interesting about the body-position tracker. I think it would be huge to have an objective measure of how long we can spend standing/walking. Having to lie flat so much is a major drag on what we can all do and I would think this would be an important outcome measure for any trial. Do you think it deserves a separate thread?
 
I've been wanting to do something like this but it's too much effort for me. I feel like I'm eating too much and have wondered whether that could be due to a deficiency. Carnitine and a micronutrients supplements seemed to reduce my hunger.

PEM also increases my hunger. It would be interesting to know whether that is due to increased demand for certain nutrients, like amino acids.

I read that it takes months until the body's metabolism changes after significant dietary changes. Rigidly sticking to a high vegetable diet has been good for me. The gains have been permanent.
 
Last edited:
@forestglip This is really interesting about the body-position tracker. I think it would be huge to have an objective measure of how long we can spend standing/walking. Having to lie flat so much is a major drag on what we can all do and I would think this would be an important outcome measure for any trial. Do you think it deserves a separate thread?

That's probably a good idea. I made a thread here: Body position tracking (e.g. activPAL)

PEM also increases my hunger. It would be interesting to know whether that is due to increased demand for certain nutrients, like amino acids.

I get hungry during PEM too. My gut tells me if hunger after PEM is actually based on a physiological need, it'd just be about increasing total energy intake. But maybe this is something else I can look at in the data and see if it's actually a micronutrient.
 
I get hungry during PEM too.

Are you actually hungry because you didn't eat or haven't eaten in a while? Sometimes thirst and fatigue are mistaken for hunger.

I lose my appetite during delayed PEM and feel very thirsty/dehydrated. I wrote this on your other thread that you started.

Maybe need more electrolytes during PEM?
 
Are you actually hungry because you didn't eat or haven't eaten in a while? Sometimes thirst and fatigue are mistaken for hunger.

I lose my appetite during delayed PEM and feel very thirsty/dehydrated. I wrote this on your other thread that you started.

Maybe need more electrolytes during PEM?

It's possible. It'd be good to figure out the real reason for the hunger.
 
I'm still working on my nutrient tracking experiment. Just wanted to outline the direction I'm hoping for it to go.

Data collection consists of two parts:

Nutrients
Using the app Cronometer, I am tracking the weight of every food I eat. Except for very rare exceptions, I only eat foods that are "whole foods", and the app entries for these foods contain values for dozens of micronutrients. (For processed/packaged foods, the nutrition information is based on nutrition labels so it only includes a few nutrients, while for whole foods like vegetables, grains, etc, the app uses comprehensive nutrient data compiled by the University of Minnesota in the Nutrient Coordinating Center Database.)

These are the 75 nutrients which almost every food I eat has data for:
Energy (kcal)
Added Sugars (g)
Alanine (g)
Alpha-carotene (µg)
Arginine (g)
Ash (g)
Aspartic acid (g)
B1 (Thiamine) (mg)
B12 (Cobalamin) (µg)
B2 (Riboflavin) (mg)
B3 (Niacin) (mg)
B5 (Pantothenic Acid) (mg)
B6 (Pyridoxine) (mg)
Beta Tocopherol (mg)
Beta-carotene (µg)
Beta-cryptoxanthin (µg)
Calcium (mg)
Carbs (g)
Cholesterol (mg)
Choline (mg)
Copper (mg)
Cystine (g)
Delta Tocopherol (mg)
Fat (g)
Fiber (g)
Folate (µg)
Fructose (g)
Galactose (g)
Gamma Tocopherol (mg)
Glucose (g)
Glutamic acid (g)
Glycine (g)
Histidine (g)
Iron (mg)
Isoleucine (g)
Lactose (g)
Leucine (g)
Lutein+Zeaxanthin (µg)
Lycopene (µg)
Lysine (g)
Magnesium (mg)
Maltose (g)
Manganese (mg)
Methionine (g)
Monounsaturated (g)
Net Carbs (g)
Omega-3 (g)
Omega-6 (g)
Oxalate (mg)
Phenylalanine (g)
Phosphorus (mg)
Polyunsaturated (g)
Potassium (mg)
Proline (g)
Protein (g)
Retinol (µg)
Saturated (g)
Selenium (µg)
Serine (g)
Sodium (mg)
Starch (g)
Sucrose (g)
Sugar Alcohol (g)
Sugars (g)
Threonine (g)
Trans-Fats (g)
Tryptophan (g)
Tyrosine (g)
Valine (g)
Vitamin A (µg)
Vitamin C (mg)
Vitamin D (IU)
Vitamin E (mg)
Vitamin K (µg)
Water (g)
Zinc (mg)

Hours upright
As I described in another thread, I'm using an app on my smartwatch to tap a button to log the time every time I switch positions between lying down and being in any other position (reclining, sitting, standing) in order to track the total time spent upright each day, which is the best thing I've thought of so far for an objective metric of my ME/CFS. I've been able to be consistent with pressing it almost every single time (probably >99.5%) immediately when I switch positions, and on the rare times I forgot (which is getting to be even more rare as it becomes a habit), I remember to do it within an hour or two at most and can estimate the time I switched positions to within a few minutes.

I've tracked position for about 5 months so far, and nutrients for longer (I'll only use nutrient data from after I started tracking position).



Main plan
So the overall goal is to track these for many months, then for each nutrient, statistically test if it is associated with upright time. The hardest part about this will probably be the statistics, because I know very little about data analysis on time series. From what I have read so far, I think Granger Causality is the test I'll want to use. It compares two time series to see if the values of one (nutrient) can forecast the future values of another (upright time). (In spite of its name, it's not actually testing if one time series definitively causes another.)

What I would like to do is, maybe after 6-9 months, do the tests on all the nutrients, then note down which are most significantly associated with upright time. Then I'll continue tracking new data for another 6 months, and test them all again to see if the original significant nutrients are significant in the new data.

If any nutrients seem convincing, then I'll start experimenting with taking these nutrients in supplement form in larger doses than are found in foods to see if they have any noticeable effect, maybe while also trying to do some kind of blinding to minimize placebo effect.



Hiding data from myself
Also, I would like to prevent bias in the data collection stage. By bias, I mean that I would see that a nutrient, maybe chromium, is significant after 6 months. For the next six months, if I know approximately which foods contain chromium, that may act as a placebo, influencing my upright time.

So what I am doing is using a script I wrote to obfuscate the nutrient information. It does a couple things: It replaces every nutrient name with a random word and shuffles the positions of the nutrients in the dataset. At this point, the values are still the original values, which I might be able to match to what I know, so for every nutrient, it scales the values to between 0 and 1, then multiplies each nutrient's values by a random number.

So at this point, the names and values are totally different from the original data, but the pattern of values is still identical for each nutrient, so it shouldn't affect any statistical tests. (In other words, if I ate two times as much of nutrient A on day 2 as on day 1, the value will still be two times higher, but it won't match the exact real values).

I also store an encrypted file which contains the mapping between the original nutrient name and the random word that replaced it, so that when I do the second set of tests, I can map them the same way in the new data so that the names are consistent, and so that I can check what nutrient the words correspond to if I need that information.



Preliminary visualization
I've done some preliminary visualizing and testing of the obfuscated data. As an example of a chart that combines a nutrient and upright time, here is daily energy (kcal) and upright time (calories is the only nutrient I don't obfuscate because it seems like one that would be easy for me to guess based on the pattern anyway since I know how many calories I eat, and because I might also try controlling for calories when doing the tests with other nutrients):
plot_Energy (kcal)_vs_hours.png

Not much pattern above that I can see. I tried running granger causality between every nutrient and time upright (again I don't know what I'm doing, so I'm just using default settings and hoping it's not wildly wrong). Here is what the distribution of p-values looks like from that test when run with a "lag" of one day (how well does a nutrient value predict upright time the next day):
p-value_histplot_2025_06_16T22:48:33.png

It looks like there's some sort of not totally random pattern where some nutrients are skewed towards smaller p-values. (The spike near 1 is kind of odd.) The most significant is a nutrient called "flux" (that's the random word that replaced the real nutrient name, so I don't know what it really is). Here is the chart of that nutrient and upright time:
plot_flux_vs_hours.png

It does seem to have a little bit of a matching pattern between lines. There are a couple tall orange spikes that are followed by tall blue spikes soon after.



Multiple test correction
After FDR correction, none are significant, so I'm going to keep collecting data for several months for the first analysis in hopes that more data increases the statistical power to create even lower p-values for some of these. Then I'll keep collecting data and do the tests with only new data a while after that to see if anything matches up.



Final thoughts
There's plenty of room for confounding in this experiment. Maybe calories are what cause me to be upright more, and other nutrients increase just because I eat more calories total. That's why I want to try to control for calories if I can.

It's possible that if I do more exertion, I eat more of a certain nutrient, and then I get PEM and am upright less, so it'd really be upright time predicting future upright time. But from what I've read about granger causality so far, I think what it does is tests how much the time series can predict itself in the future (upright time predicting future upright time), then sees how much the other time series can predict the first time series on top of that. So if both the amount I am upright and how much sugar I eat on day 1 perfectly predict how much I am upright on day 2, then there will be no granger causality association between sugar and upright time because it's already fully predicted by upright time itself. (Again, very shallow understanding of this and might be wrong.)

So anyway, the ultimate test of causality will be placebo testing of the nutrient in many months time after I see if any are significant. My hopes aren't especially high that I'll actually find something that is useful. But it's exciting, it gives me something to look forward to that I am in control of, and it feels like there's at least a possibility something interesting will turn up if I have hundreds of datapoints.
 
Last edited:
Very impressive @forestglip. That's very dedicated nutrient and activity tracking. It is exciting, I'm interested to see what you find.

Yes, the confounding with activity level may well be a problem. Do you think you change what you eat when you are active versus in PEM? e.g. maybe you eat a wider variety of food when you are feeling well.
 
Yes, the confounding with activity level may well be a problem. Do you think you change what you eat when you are active versus in PEM? e.g. maybe you eat a wider variety of food when you are feeling well.
PEM definitely affects my diet. I eat more total calories, and eat less variety because I have less energy to prepare foods.

Hopefully, my basic understanding of granger causality is correct, where it would essentially "control" for previous upright time, so it should mitigate confounding from physical crashes to some extent. Otherwise, yes, it might just end up being foods that I eat in different quantities because I'm in a crash.

And then there is mental exertion causing crashes and changing my diet. I don't track that so I can't control for it, and it might lead to substantial confounding. So I won't really know anything until eventually doing some controlled testing.
 
I've been varying my diet recently. I find sugar has wonderful short run effects, I think it changes some things for the better, not just readily available energy but also maybe blood pressure. However periods I can manage to cut it out are periods where my PEM is far less. Sugar is a real generator of downward spirals: the more crappy carbs I eat the more I seem to need them.
 
I've been varying my diet recently. I find sugar has wonderful short run effects, I think it changes some things for the better, not just readily available energy but also maybe blood pressure. However periods I can manage to cut it out are periods where my PEM is far less. Sugar is a real generator of downward spirals: the more crappy carbs I eat the more I seem to need them.
I haven't been able to make any consistent connections with food. Maybe peanuts cause little bumps on my skin the next day sometimes.
 
Long story short, I did not find any significant associations, looking for associations of nutrient intake with time upright, when analyzing a year of nutrient data

In January, after recording a year of foods eaten, as well as tracking time upright and amount of time sleeping every day, I tried to test for an association between intake of a given nutrient and the amount of time I spent upright, up to 7 days after the nutrient intake.

I used granger causality, a linear regression-based method for testing associations between different time series. In this case, the dependent variable was time spent upright on a given day. There were covariates for time upright for each of the 7 days prior, and the independent variables of interest were the 7 days prior of nutrient intake. I also added 7 days prior of total calories and sleep time as potential confounding covariates. The null hypothesis of the test was that all 7 days of nutrient intake are not associated with the upright time.

There was data for about 70 nutrients. After FDR correction, none were significant. I also tried using a non-linear variant of granger causality called mlcausality. Again no significant findings.

Here are all the time series, visualized (big file). The first column is the raw data. The second column is after removing some nutrients where the time series was very irregular and thus wouldn't be good for granger causality.* A couple foods were also removed for having huge amounts of a certain nutrient, which could negatively affect how well the test works. (Though I think I ended up not even using those nutrients, so maybe this was not necessary, though it shouldn't have changed things much.) The third column is with the data detrended (basically if the value is slowly trending upwards over time, it gets so that it stays approximately around the same mean over time.) The detrended data is what I used for granger causality testing.

all_series_three_cols_outlier-foods-and-nutrients-removed.png

Almost certainly the analysis was not done optimally as I had no experience with time series analysis before this. It's an advanced topic, and I was running on fumes trying to read as much as possible about it, and I've still barely scratched the surface. But I have the general idea down, and if there was a large association with a nutrient, which I was hoping for, I expected that it would still be significant even if my analysis was not completely perfect.

Since tracking these metrics has become a habit, I've continued tracking upright time, sleep, and nutrient intake since then. I might try re-running it in the future with more data, though I don't have high hopes for it. I mainly want to keep tracking upright time in case I think of other things to do with a decent metric for severity.

I was really hoping for a nutrient to be associated with time upright, and before I did the analysis I had started writing a "paper" that I planned to include all the details in, in case of significant findings. I don't have the energy or will to finish writing it, given the negative findings, but in case some of the details might be interesting to anyone, here is what I had written already:

Introduction​

Myalgic encephalomyelitis/chronic fatigue syndrome (ME/CFS) is characterized by various symptoms, such as fatigue, brain fog, and orthostatic intolerance, though specific symptoms differ among individuals. The most notable characteristic of ME/CFS is that symptoms increase in severity after minor physical or cognitive exertion, often after a delay of at least around 12 hours and for a prolonged time of several days to a week or sometimes even longer. The increase in symptoms is referred to as post-exertional malaise (PEM) or a “crash”. (1)

There are currently no approved treatments for ME/CFS, and there is no conclusive data identifying the underlying pathophysiology of the disease.

I am a male in my 30s with a diagnosis of ME/CFS. I experience profound fatigue and brain fog all of the time, as well as anxiety that generally feels like being “wired” or “on edge”. All of these symptoms worsen after minor exertion, which, for example, can be in the form of reading a book or taking a short walk around a grocery store. Generally, about 24 hours after such exertion, fatigue and brain fog gradually become more pronounced. In some cases, I wake up the morning after over-exerting with a sore throat. I often also experience insomnia the night, or sometimes multiple nights, after over-exertion.

The PEM normally lasts about 1 day to 1 week. The duration and severity of PEM depends on the intensity of exertion. Pushing through a crash and continuing to participate in physical or cognitive activities leads to worse and worse symptoms until both physical and mental functioning become nearly impossible, and symptoms feel severely uncomfortable. Thus, to avoid unnecessary symptoms, I try to limit exertion as much as possible, though activities of daily living and motivation to pursue small amounts of enjoyable activities prevent avoiding all PEM-inducing exertion.

I spend nearly all of my day lying down, both due to constant fatigue which makes sitting up for too long difficult, and also to try to prevent subsequent PEM. On average, I am lying down horizontally for all but around four hours each day.

In an effort to try to use my own experience to try to help identify underlying mechanisms of ME/CFS, the present study was undertaken to explore whether any associations exist between dietary nutrient intake and my symptoms. For one year, I tracked symptom severity, based on measuring daily time spent upright, and daily dietary intake of dozens of different macronutrients and micronutrients. I tested the hypothesis that one or more of the measured nutrients may causally affect time spent upright one or more days following the nutrient exposure by using several time series analysis methods, including cross-correlation, granger causality, and PCMCI.

Methods​

Nutrient tracking​

To track daily macronutrient/micronutrient intake, I used Cronometer (2) which is a free health and nutrition tracking mobile app. Cronometer relies on several sources of data for nutrition information, including, but not limited to, nutrition labels on food packaging, the USDA nutrient database, and the Nutrition Coordinating Center Food & Nutrient Database (NCCDB) (3).

The NCCDB is an expansive database of foods and nutrients, curated by a team at the Nutrition Coordinating Center at the University of Minnesota. Data in the NCCDB is compiled from multiple sources, primarily the USDA National Nutrient Database, with missing information supplemented in various ways, such as from nutrition literature or imputed based on similar foods. (3)

Cronometer food entries based on the NCCDB almost always contain information for more nutrients than entries based on other sources. Thus, to maximize the number of nutrients that I would have data for, I made an effort to only use the NCCDB-based nutrition information in the app, and only eat foods which the app had NCCDB-based data for. I mostly eat a whole food diet, which consists of foods such as fruits, unprocessed meat, nuts, and raw or cooked vegetables. These types of foods are well represented in the database. Rarely, I eat processed foods such as potato chips, but I attempt to only eat foods from brands which have associated NCCDB entries in Cronometer.

Generally, for nearly every food I eat, I weigh the food on a kitchen scale, find the corresponding NCCDB entry in the Cronometer app, and save the food with the weight in grams.

Sometimes I eat foods with multiple ingredients that were prepared by others, and which I do not know the precise composition of, such as during a holiday dinner. A similar food item is chosen in these cases, but the data for these entries is likely to be inaccurate. I expect that the influence of this inaccurate data on the study is fairly minimal because this happens fairly rarely (I would estimate it as less than about 10 times within the year of data in this study).

On rare occasions, I have realized that I had forgotten to weigh or log a food. In these cases, I either made an attempt to log a somewhat accurate estimate, or skipped logging the food if I could not be sure which day I had eaten it.

Sometimes, data entry is somewhat more complicated. For example, for potatoes, the app has an entry for baked potatoes, but not raw potatoes. Baked potatoes weigh less for the same number of calories due to evaporation, but I weigh potatoes when they are raw, so a conversion factor is needed. Based on comparing the nutrition information to the entry for raw potatoes in the USDA, I calculated a conversion factor of 0.812. Thus, I would weigh a raw potato, then multiply the weight by 0.812 to determine what the weight would be if the potato was baked, then store this calculated value as the weight for the “baked potato” entry in the app.

I sometimes eat canned foods, such as canned beans. The nutrition information generally does not match the app’s information very well if basing on the actual weight of the food in the can, so in these cases, I determine how many grams to enter for the weight of a full can in order for the app entry nutrition data to match as closely as possible with the limited information actually printed on the can.

Several other foods needed to be converted in this way, so I have a note on my smartphone for reference which includes these conversion factors for various foods.

The recorded nutrition data was downloaded from the Cronometer website for analysis.

Upright Time​

As an objective measure of my symptoms, I tracked the exact amount of time that I was in any position other than lying down horizontally, such as sitting, reclining, standing, or walking. I will refer to this as “upright time”. I consider positions where my torso is greater than around 10° from horizontal as being upright.

To track upright time, I created an app for the Bangle.js v2 smartwatch (4) for easily storing the time that I switch from lying down to upright or vice versa. Figure 1 shows screenshots of the app’s interface.
positions_main_top_light.pngpositions_main_bottom_light.pngsave_upright_top_light.pngsave_upright_bottom_light.pngconfirm_upright_light.png

Whenever I sat up or stood up from a lying down position, I unlocked the smartwatch to log the change in positions. I pressed the button labeled “Upright”, then pressed the button “Now”, which indicates that I want to save the current time, then “Confirm”. The button labeled “Lying down” was used when changing from being upright to lying down.

The text above the buttons on the main screen shows which position was last recorded, and the time of recording.

In addition to the option to press “Now” when saving a time, there are also options for “30 seconds ago”, “Minutes ago”, and “Minutes after”, which could be used if I forgot to log a position change immediately after it happened. “Minutes ago” allows for selecting a custom number of minutes before the present time to save as the logged time and “Minutes after” allows for selecting a custom number of minutes after the last logged position change.

There is an option on the main screen to delete the last entry if I made a mistake (“Delete last”), as well as a “Missing Data” option. The latter option can be used with the “Minutes after” option to indicate that positions data after the logged time and up to the next position log is unknown. This was implemented in case I forgot or was unable to log positions data for a prolonged period, but I did not end up needing to use this.

Data is stored in CSV format on the watch. The following is an example of several entries stored in the log, where the first column contains the position (‘ly’ = lying down, ‘up’ = upright) and the second column indicates the time that I switched to that position. The time is stored in Unix time format, which is the number of seconds that have elapsed since the Unix epoch (00:00:00, 1 January 1970).

ly,1759926109
up,1759930429
ly,1759932223
up,1759935087
ly,1759943969
up,1759949728

Data was downloaded from the watch to a personal computer every few weeks.

Statistical Analysis​

Various time series analysis tools were used to test for potential causal associations between nutrients and upright time.




Results​

Upright Time​

There is very little measurement error in the upright time data. I nearly always logged a time within seconds of switching positions. Very rarely, I forgot to immediately record a change in position, but remembered within about one or two hours at most, and added a log based on an estimated time. On rare occasions, I changed positions then changed back within about 30 seconds but did not store a log. I estimate that the recorded daily upright time deviates from the correct upright time by less than one minute per day on average.




Discussion​

Time series analysis on dietary intake of nutrients over a long duration presents a unique opportunity to identify potential factors which might causally influence symptom metrics. Genome-wide association studies (GWAS) and proteomics studies test a vast number of associations at the same time, in the hopes of identifying one or more true associations. The present study might be considered a form of “intervention-wide association study”, in the sense that many interventions, here in the form of dietary nutrients, are tested at the same time. While prescribing large numbers of different supplements or drugs presents potential risks due to toxicity, a study on diet, as was performed here, presents an accessible, albeit less controlled, alternative.

People already ingest varying amounts of a very large number of different chemicals every day in the form of nutrients in food. While any given nutrient’s effect on symptom scores would likely be very small, it is possible that with enough longitudinal data points, one could create a large enough data set to capture significance from tiny effects. It is plausible that if a nutrient level is associated with symptom scores, it may be possible to identify specific biological pathways through nutrients that are able to affect symptoms, which may in turn help in identifying potential interventions or mechanisms of a disease.

Upright time was selected as the target symptom metric in this study because the time I spend lying down has subjectively seemed to have a fairly strong correlation with changes in my disease severity over the years I have had ME/CFS. Further, upright time could be tracked with practically zero measurement error when using an app for manual logging. I considered tracking step count for this study, but devices that measure step count typically deviate somewhat from true counts due to unrelated body movements, which may have decreased power to detect associations. However, it is possible the concern about inaccuracies may be outweighed if step count represents a more “correct” marker of disease severity than upright time.

Limitations​

I am a beginner in statistical analysis, and had no experience in time series analysis before this project, so all findings should be interpreted with caution.

The observational nature of this study prevents knowing whether or not the associations found are causal. For example, it is possible that a confounder, such as physical exertion causing both an immediate change in diet due to increased hunger as well as a later decrease in upright time due to PEM, could explain the associations. Energy intake was included as a parameter to attempt to control for this confounder, but it is possible that hidden confounders remain.

Lack of blinding, in the sense that I had no way to prevent myself from knowing which foods I was eating, could have introduced bias. However, because I did not know the specific amounts of nutrients in any of the foods I was eating, the risk of associations arising due to expectation bias may have been tempered to some extent.

Inaccuracies in nutrient intake may have decreased the ability to detect associations. When comparing the nutrient label information on various foods with Cronometer app entries for the same foods, sometimes values for some nutrients are different by a factor of up to around 2 or 3, even when some of the other nutrients are matched exactly. I am not aware of the extent to which the nutrient levels tracked in Cronometer differ from the true amounts in the foods eaten, but it is possible that more accurate nutrient data could increase the power to detect associations.

A further limitation affecting the ability to identify true associations is that the levels of different nutrients can be highly correlated because of their grouping within a given food. Eating a wide variety of foods should decrease the strong correlation between nutrients and lead to fewer false positives.

Since it is not feasible to track every single micronutrient present in food, it is possible that untracked nutrients or other chemicals could represent unknown confounders if they are highly correlated to any of the tracked nutrients.

Because the present study was done on only one person, the results can not readily be generalized to a larger population.

Future directions​

This study tracked the symptom of ME/CFS, but in theory this framework could be applied to any disease in which the severity of a symptom could be accurately tracked on a frequent, for example daily, basis.

With sufficient resources, a future study could potentially perform a more controlled version of this analysis. Participants could truly be prescribed random amounts of pre-selected foods throughout the duration of the study, to mitigate the bias inherent when participants are able to select which foods they eat.

The significant investment of time and motivation needed to track foods for a long duration makes the present study design potentially impractical in larger populations. It may be possible to instead track a proxy of nutrient intake, such as daily levels of nutrient metabolites present in the urine.


References
1.Beyond Myalgic Encephalomyelitis/Chronic Fatigue Syndrome: Redefining an Illness [Internet]. Washington, D.C.: National Academies Press; 2015 [cited 2025 Dec 7]. Available from: http://www.nap.edu/catalog/19012

2.Cronometer [Internet]. [cited 2025 Dec 5]. Available from: https://cronometer.com/

3.NDSR Software Food and Nutrient Database [Internet]. Nutrition Coordinating Center (NCC). [cited 2025 Dec 5]. Available from: https://www.ncc.umn.edu/ndsr-database-page/

4.Bangle.js - Hackable Smart Watch [Internet]. [cited 2025 Dec 5]. Available from: https://banglejs.com/

* The technical terminology is that the data for some nutrients was non-stationary. Granger causality assumes the data comes from a stationary process, with stationary meaning constant mean and constant variance. Some nutrients had large changes in variance over time, which violate the assumptions of the test.

I uploaded the code I used for data cleaning and analysis to GitHub.
 
Last edited:
I got a couple cool charts out of it though. Here is a heatmap showing correlation between daily intake of different nutrients. For example, all the nutrient pairs in the dark red area have high correlations because they are all amino acids, so tend to all be high whenever I eat more protein.

correlation_heatmap.png

The following is a plot to visualize the time of day and pattern of my time upright. The x-axis shows the time of day, and the y-axis is what proportion of days, out of the 365 days in the dataset, that I was upright at that time.

For example, there's a peak around 10 AM at a height of around 0.6, meaning that in around 60% of the days in the year, I was upright at 10 AM. That's generally when I make food. On the other hand, at around 4 PM, if you stopped by on a random day, there's only around a 20% chance I'd be upright, and an ~80% chance I'd be lying down.

average_upright_time.png

Here's the main upright time metric:

cleaned_upright_time.png
 
I had not seen this thread before. I am totally blown away by all the work you did with this. I may have missed it (I've been jumping around reading chunks of your posts) but do you have a sense of the accuracy/variance of the nutritional information you were using?

I feel your disappointment with the null result. What you did learn (and rule out) still seems really interesting though. Do you feel like the 'spikiness' in your upright time data reflects how variable your ME/CFS is one day to the next? And did sleep also show no correlation with upright time?

I've been dreaming of finding a way to compare my wellness to historical weather data, but I've been stuck on the "find an objective measure" step. I don't think there's much hope of me tracking upright time the way you did haha.
 
Thank you for this! I love heatmaps of nutrients, they are so interesting to compare with what one would expect from "common" food combinations. I'm sorry to see Iodine wasn't in your analysis as it is easy to miss, and I am very curious to how it is correlated with nutrients in other countries than Norway since we are one of the few special cases with little-to-none iodine fortification in food.

I'm not sure what food composition datatable Cronometer use, but these tables are notorious for having bad data unfortunately. When I downloaded the raw data from the Norwegian "Matvaretabellen" I even found two columns that had been switched, and that dataset had been out for a while before I downloaded it (the analysis was correct if you used their online lookup-table, which I guess most people do if they use it at all so I guess understandable in that sense but still!).

Initial thoughts:
- I didn't see a comparison against nutrient needs
- A weekly or even monthly intake might be better to look for associations as for some nutrients you don't need to eat them every day to have enough of them in your body to maintain function
- For the same reason above, removing outlier foods/high nutrient peaks might not be necessary as your body stores some nutrients for later use, and others are excreted etc. There's not a lot of them, but for example nuts, olive oil and omega-3 supplements would be foods that could influence cell membrane fluidity, which could influence blood flow. These foods are also high in fats which would be stored in your body for a while and not just influence the specific day they were eaten.
- Food combinations matter, for example in the heat map zinc seems to be consumed together with fibre. If I saw this in a client's data I would ask if they consumed a lot of whole grains together with zinc rich foods, or if the zinc also comes from the whole grains. Zinc in whole grains have different bioavailability depending on how the grains have been prepared, so even if it looks to be an adequate intake on paper it could be deficient.

A general note as it didn't seem to affect your analysis much: I'm not sure how well it works to remove nutrients with > 0.2 missing values. Since Cronometer has amino acids and lacks iodine I'm assuming it's based on US data, but at the same time food composition datatables often contain "borrowed foods" from other food composition datatables. If the Cronometer database "borrows" from for example Norway, you would not get amino acid information (but you could get fatty acid information). If I used this cutoff in the Norwegian food composition datatable I would lose a lot of information as few foods have fatty acids for example, since that is a rather new addition and not all foods have been analyzed with it in mind. Fatty acids may be easier than amino acids in this regard, but since a lot of food might not contain high amounts of fat I would check how many foods where it actually mattered that the values are missing before removing the fatty acids from analysis.

I have to look up granger analysis as I'm not familiar with it. I have only used hierarchical clustering methods and cox regression on time series data. I wonder if number of days in a row/in a week/month with "adequate" nutrient intake would create different results. Though on a personal note I eat pretty similarly from day to day and I still have symptoms. The joker would be that we don't know if something happens in our bodies that increase the need for/excretion of specific nutrients so that even if intake doesn't change the effect on the body might still not be the same. Maybe nutrient intake around times where there is a change in time spent upright (+- two weeks maybe?) could say something about that.

What a fun dataset!
 
I did a similar analysis in 2011 although using different methods. What seemed to work was the use of derived variables to group specific factors for example adding a variable that would flag a day with increased cholesterol content. Also forgive me if you mentioned this or this is in your code but how did you ensure that you captured the joint probability distributions adequately ?

Time series analysis comes with additional issues, unfortunately. For example introducing certain nutrients at a certain time point can have an additive effect days later.
 
Back
Top Bottom