Nutrient tracking experiment

forestglip

Senior Member (Voting Rights)
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.
 
Back
Top Bottom