Summary
This experiment investigates meal timing and energy levels. Fractional factorial screening of meal count, eating window, protein ratio, carb timing, and meal size distribution for sustained energy and afternoon alertness.
The design varies 5 factors: meals per day (meals), ranging from 2 to 6, eating window hrs (hrs), ranging from 8 to 16, protein pct (%), ranging from 15 to 35, morning cal pct (%), ranging from 20 to 50, and fiber g (g), ranging from 15 to 40. The goal is to optimize 2 responses: energy score (pts) (maximize) and afternoon alertness (pts) (maximize). Fixed conditions held constant across all runs include total calories = 2200, activity level = moderate.
A fractional factorial design reduces the number of runs from 32 to 8 by deliberately confounding higher-order interactions. This is ideal for screening — identifying which of the 5 factors matter most before investing in a full study.
Key Findings
For energy score, the most influential factors were eating window hrs (33.3%), fiber g (33.3%), meals per day (13.0%). The best observed value was 8.7 (at meals per day = 6, eating window hrs = 16, protein pct = 35).
For afternoon alertness, the most influential factors were morning cal pct (28.5%), meals per day (25.5%), fiber g (24.1%). The best observed value was 7.3 (at meals per day = 6, eating window hrs = 16, protein pct = 35).
Recommended Next Steps
- Follow up with a response surface design (CCD or Box-Behnken) on the top 3–4 factors to model curvature and find the true optimum.
- Consider whether any fixed factors should be varied in a future study.
- The screening results can guide factor reduction — drop factors contributing less than 5% and re-run with a smaller, more focused design.
Experimental Setup
Factors
| Factor | Low | High | Unit |
meals_per_day | 2 | 6 | meals |
eating_window_hrs | 8 | 16 | hrs |
protein_pct | 15 | 35 | % |
morning_cal_pct | 20 | 50 | % |
fiber_g | 15 | 40 | g |
Fixed: total_calories = 2200, activity_level = moderate
Responses
| Response | Direction | Unit |
energy_score | ↑ maximize | pts |
afternoon_alertness | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "Meal Timing and Energy Levels",
"description": "Fractional factorial screening of meal count, eating window, protein ratio, carb timing, and meal size distribution for sustained energy and afternoon alertness"
},
"factors": [
{
"name": "meals_per_day",
"levels": [
"2",
"6"
],
"type": "continuous",
"unit": "meals"
},
{
"name": "eating_window_hrs",
"levels": [
"8",
"16"
],
"type": "continuous",
"unit": "hrs"
},
{
"name": "protein_pct",
"levels": [
"15",
"35"
],
"type": "continuous",
"unit": "%"
},
{
"name": "morning_cal_pct",
"levels": [
"20",
"50"
],
"type": "continuous",
"unit": "%"
},
{
"name": "fiber_g",
"levels": [
"15",
"40"
],
"type": "continuous",
"unit": "g"
}
],
"fixed_factors": {
"total_calories": "2200",
"activity_level": "moderate"
},
"responses": [
{
"name": "energy_score",
"optimize": "maximize",
"unit": "pts"
},
{
"name": "afternoon_alertness",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "fractional_factorial",
"test_script": "use_cases/114_meal_timing/sim.sh"
}
}
Experimental Matrix
The Fractional Factorial Design produces 8 runs. Each row is one experiment with specific factor settings.
| Run | meals_per_day | eating_window_hrs | protein_pct | morning_cal_pct | fiber_g |
| 1 | 2 | 16 | 35 | 20 | 15 |
| 2 | 6 | 8 | 15 | 20 | 15 |
| 3 | 6 | 16 | 15 | 50 | 15 |
| 4 | 6 | 16 | 35 | 50 | 40 |
| 5 | 2 | 16 | 15 | 20 | 40 |
| 6 | 6 | 8 | 35 | 20 | 40 |
| 7 | 2 | 8 | 15 | 50 | 40 |
| 8 | 2 | 8 | 35 | 50 | 15 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/114_meal_timing/config.json
2
Generate the runner script
$ doe generate --config use_cases/114_meal_timing/config.json \
--output use_cases/114_meal_timing/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/114_meal_timing/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/114_meal_timing/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/114_meal_timing/config.json
6
Multi-objective optimization
With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.
$ doe optimize --config use_cases/114_meal_timing/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/114_meal_timing/config.json \
--output use_cases/114_meal_timing/results/report.html
Features Exercised
| Feature | Value |
| Design type | fractional_factorial |
| Factor types | continuous (all 5) |
| Arg style | double-dash |
| Responses | 2 (energy_score ↑, afternoon_alertness ↑) |
| Total runs | 8 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: energy_score
Top factors: eating_window_hrs (33.3%), fiber_g (33.3%), meals_per_day (13.0%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| meals_per_day | 1 | 0.4050 | 0.4050 | 0.187 | 0.6836 |
| eating_window_hrs | 1 | 2.6450 | 2.6450 | 1.220 | 0.3196 |
| protein_pct | 1 | 0.4050 | 0.4050 | 0.187 | 0.6836 |
| morning_cal_pct | 1 | 0.1250 | 0.1250 | 0.058 | 0.8198 |
| fiber_g | 1 | 2.6450 | 2.6450 | 1.220 | 0.3196 |
| meals_per_day*eating_window_hrs | 1 | 0.1250 | 0.1250 | 0.058 | 0.8198 |
| meals_per_day*protein_pct | 1 | 2.6450 | 2.6450 | 1.220 | 0.3196 |
| meals_per_day*morning_cal_pct | 1 | 2.6450 | 2.6450 | 1.220 | 0.3196 |
| meals_per_day*fiber_g | 1 | 0.4050 | 0.4050 | 0.187 | 0.6836 |
| eating_window_hrs*protein_pct | 1 | 4.8050 | 4.8050 | 2.217 | 0.1967 |
| eating_window_hrs*morning_cal_pct | 1 | 0.4050 | 0.4050 | 0.187 | 0.6836 |
| eating_window_hrs*fiber_g | 1 | 1.4450 | 1.4450 | 0.667 | 0.4513 |
| protein_pct*morning_cal_pct | 1 | 1.4450 | 1.4450 | 0.667 | 0.4513 |
| protein_pct*fiber_g | 1 | 0.4050 | 0.4050 | 0.187 | 0.6836 |
| morning_cal_pct*fiber_g | 1 | 4.8050 | 4.8050 | 2.217 | 0.1967 |
| Error | (Lenth | PSE) | 5 | 10.8375 | 2.1675 |
| Total | 7 | 12.4750 | 1.7821 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: afternoon_alertness
Top factors: morning_cal_pct (28.5%), meals_per_day (25.5%), fiber_g (24.1%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| meals_per_day | 1 | 1.5312 | 1.5312 | 0.667 | 0.4513 |
| eating_window_hrs | 1 | 0.1013 | 0.1013 | 0.044 | 0.8420 |
| protein_pct | 1 | 0.5512 | 0.5512 | 0.240 | 0.6449 |
| morning_cal_pct | 1 | 1.9013 | 1.9013 | 0.828 | 0.4046 |
| fiber_g | 1 | 1.3613 | 1.3613 | 0.593 | 0.4762 |
| meals_per_day*eating_window_hrs | 1 | 1.9012 | 1.9012 | 0.828 | 0.4046 |
| meals_per_day*protein_pct | 1 | 1.3612 | 1.3612 | 0.593 | 0.4762 |
| meals_per_day*morning_cal_pct | 1 | 0.1012 | 0.1012 | 0.044 | 0.8420 |
| meals_per_day*fiber_g | 1 | 0.5512 | 0.5512 | 0.240 | 0.6449 |
| eating_window_hrs*protein_pct | 1 | 1.9012 | 1.9012 | 0.828 | 0.4046 |
| eating_window_hrs*morning_cal_pct | 1 | 1.5312 | 1.5312 | 0.667 | 0.4513 |
| eating_window_hrs*fiber_g | 1 | 1.9012 | 1.9012 | 0.828 | 0.4046 |
| protein_pct*morning_cal_pct | 1 | 1.9013 | 1.9013 | 0.828 | 0.4046 |
| protein_pct*fiber_g | 1 | 1.5312 | 1.5312 | 0.667 | 0.4513 |
| morning_cal_pct*fiber_g | 1 | 1.9012 | 1.9012 | 0.828 | 0.4046 |
| Error | (Lenth | PSE) | 5 | 11.4844 | 2.2969 |
| Total | 7 | 9.2487 | 1.3212 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
afternoon alertness eating window hrs vs fiber g
afternoon alertness eating window hrs vs morning cal pct
afternoon alertness eating window hrs vs protein pct
afternoon alertness meals per day vs eating window hrs
afternoon alertness meals per day vs fiber g
afternoon alertness meals per day vs morning cal pct
afternoon alertness meals per day vs protein pct
afternoon alertness morning cal pct vs fiber g
afternoon alertness protein pct vs fiber g
afternoon alertness protein pct vs morning cal pct
energy score eating window hrs vs fiber g
energy score eating window hrs vs morning cal pct
energy score eating window hrs vs protein pct
energy score meals per day vs eating window hrs
energy score meals per day vs fiber g
energy score meals per day vs morning cal pct
energy score meals per day vs protein pct
energy score morning cal pct vs fiber g
energy score protein pct vs fiber g
energy score protein pct vs morning cal pct
Multi-Objective Optimization
When responses compete, Derringer–Suich desirability finds the best compromise.
Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.
Overall Desirability
D = 0.9545
Per-Response Desirability
| Response | Weight | Desirability | Predicted | Dir |
energy_score |
1.0 |
|
8.70 0.9545 8.70 pts |
↑ |
afternoon_alertness |
1.5 |
|
7.30 0.9545 7.30 pts |
↑ |
Recommended Settings
| Factor | Value |
meals_per_day | 6 meals |
eating_window_hrs | 16 hrs |
protein_pct | 35 % |
morning_cal_pct | 50 % |
fiber_g | 40 g |
Source: from observed run #4
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
afternoon_alertness | 7.30 | 7.30 | +0.00 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #8 | 0.6167 | meals_per_day=6, eating_window_hrs=16, protein_pct=15, morning_cal_pct=50, fiber_g=15 |
| #6 | 0.5357 | meals_per_day=2, eating_window_hrs=8, protein_pct=15, morning_cal_pct=50, fiber_g=40 |
Model Quality
| Response | R² | Type |
afternoon_alertness | 0.7229 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.9545
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
energy_score 1.0 0.9545 8.70 pts ↑
afternoon_alertness 1.5 0.9545 7.30 pts ↑
Recommended settings:
meals_per_day = 6 meals
eating_window_hrs = 16 hrs
protein_pct = 35 %
morning_cal_pct = 50 %
fiber_g = 40 g
(from observed run #4)
Trade-off summary:
energy_score: 8.70 (best observed: 8.70, sacrifice: +0.00)
afternoon_alertness: 7.30 (best observed: 7.30, sacrifice: +0.00)
Model quality:
energy_score: R² = 0.5267 (linear)
afternoon_alertness: R² = 0.7229 (linear)
Top 3 observed runs by overall desirability:
1. Run #4 (D=0.9545): meals_per_day=6, eating_window_hrs=16, protein_pct=35, morning_cal_pct=50, fiber_g=40
2. Run #8 (D=0.6167): meals_per_day=6, eating_window_hrs=16, protein_pct=15, morning_cal_pct=50, fiber_g=15
3. Run #6 (D=0.5357): meals_per_day=2, eating_window_hrs=8, protein_pct=15, morning_cal_pct=50, fiber_g=40
Full Analysis Output
=== Main Effects: energy_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
eating_window_hrs 1.1500 0.4720 33.3%
fiber_g 1.1500 0.4720 33.3%
meals_per_day -0.4500 0.4720 13.0%
protein_pct -0.4500 0.4720 13.0%
morning_cal_pct -0.2500 0.4720 7.2%
=== ANOVA Table: energy_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
meals_per_day 1 0.4050 0.4050 0.187 0.6836
eating_window_hrs 1 2.6450 2.6450 1.220 0.3196
protein_pct 1 0.4050 0.4050 0.187 0.6836
morning_cal_pct 1 0.1250 0.1250 0.058 0.8198
fiber_g 1 2.6450 2.6450 1.220 0.3196
meals_per_day*eating_window_hrs 1 0.1250 0.1250 0.058 0.8198
meals_per_day*protein_pct 1 2.6450 2.6450 1.220 0.3196
meals_per_day*morning_cal_pct 1 2.6450 2.6450 1.220 0.3196
meals_per_day*fiber_g 1 0.4050 0.4050 0.187 0.6836
eating_window_hrs*protein_pct 1 4.8050 4.8050 2.217 0.1967
eating_window_hrs*morning_cal_pct 1 0.4050 0.4050 0.187 0.6836
eating_window_hrs*fiber_g 1 1.4450 1.4450 0.667 0.4513
protein_pct*morning_cal_pct 1 1.4450 1.4450 0.667 0.4513
protein_pct*fiber_g 1 0.4050 0.4050 0.187 0.6836
morning_cal_pct*fiber_g 1 4.8050 4.8050 2.217 0.1967
Error (Lenth PSE) 5 10.8375 2.1675
Total 7 12.4750 1.7821
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: energy_score ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
eating_window_hrs protein_pct -1.5500 17.8%
morning_cal_pct fiber_g 1.5500 17.8%
meals_per_day protein_pct 1.1500 13.2%
meals_per_day morning_cal_pct -1.1500 13.2%
eating_window_hrs fiber_g 0.8500 9.8%
protein_pct morning_cal_pct -0.8500 9.8%
meals_per_day fiber_g -0.4500 5.2%
eating_window_hrs morning_cal_pct 0.4500 5.2%
protein_pct fiber_g -0.4500 5.2%
meals_per_day eating_window_hrs 0.2500 2.9%
=== Summary Statistics: energy_score ===
meals_per_day:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 6.2500 1.7445 4.7000 8.7000
6 4 5.8000 0.9899 4.4000 6.5000
eating_window_hrs:
Level N Mean Std Min Max
------------------------------------------------------------
16 4 5.4500 0.7724 4.4000 6.2000
8 4 6.6000 1.6371 4.7000 8.7000
protein_pct:
Level N Mean Std Min Max
------------------------------------------------------------
15 4 6.2500 1.8448 4.4000 8.7000
35 4 5.8000 0.7874 4.7000 6.5000
morning_cal_pct:
Level N Mean Std Min Max
------------------------------------------------------------
20 4 6.1500 0.5196 5.4000 6.5000
50 4 5.9000 1.9613 4.4000 8.7000
fiber_g:
Level N Mean Std Min Max
------------------------------------------------------------
15 4 5.4500 1.0536 4.4000 6.5000
40 4 6.6000 1.4720 5.4000 8.7000
=== Main Effects: afternoon_alertness ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
morning_cal_pct -0.9750 0.4064 28.5%
meals_per_day -0.8750 0.4064 25.5%
fiber_g 0.8250 0.4064 24.1%
protein_pct -0.5250 0.4064 15.3%
eating_window_hrs 0.2250 0.4064 6.6%
=== ANOVA Table: afternoon_alertness ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
meals_per_day 1 1.5312 1.5312 0.667 0.4513
eating_window_hrs 1 0.1013 0.1013 0.044 0.8420
protein_pct 1 0.5512 0.5512 0.240 0.6449
morning_cal_pct 1 1.9013 1.9013 0.828 0.4046
fiber_g 1 1.3613 1.3613 0.593 0.4762
meals_per_day*eating_window_hrs 1 1.9012 1.9012 0.828 0.4046
meals_per_day*protein_pct 1 1.3612 1.3612 0.593 0.4762
meals_per_day*morning_cal_pct 1 0.1012 0.1012 0.044 0.8420
meals_per_day*fiber_g 1 0.5512 0.5512 0.240 0.6449
eating_window_hrs*protein_pct 1 1.9012 1.9012 0.828 0.4046
eating_window_hrs*morning_cal_pct 1 1.5312 1.5312 0.667 0.4513
eating_window_hrs*fiber_g 1 1.9012 1.9012 0.828 0.4046
protein_pct*morning_cal_pct 1 1.9013 1.9013 0.828 0.4046
protein_pct*fiber_g 1 1.5312 1.5312 0.667 0.4513
morning_cal_pct*fiber_g 1 1.9012 1.9012 0.828 0.4046
Error (Lenth PSE) 5 11.4844 2.2969
Total 7 9.2487 1.3212
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: afternoon_alertness ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
meals_per_day eating_window_hrs 0.9750 11.9%
eating_window_hrs protein_pct -0.9750 11.9%
eating_window_hrs fiber_g 0.9750 11.9%
protein_pct morning_cal_pct -0.9750 11.9%
morning_cal_pct fiber_g 0.9750 11.9%
eating_window_hrs morning_cal_pct 0.8750 10.7%
protein_pct fiber_g -0.8750 10.7%
meals_per_day protein_pct 0.8250 10.1%
meals_per_day fiber_g -0.5250 6.4%
meals_per_day morning_cal_pct -0.2250 2.7%
=== Summary Statistics: afternoon_alertness ===
meals_per_day:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 6.0250 1.4361 4.0000 7.3000
6 4 5.1500 0.7141 4.4000 5.9000
eating_window_hrs:
Level N Mean Std Min Max
------------------------------------------------------------
16 4 5.4750 1.1026 4.4000 6.7000
8 4 5.7000 1.3540 4.0000 7.3000
protein_pct:
Level N Mean Std Min Max
------------------------------------------------------------
15 4 5.8500 1.2014 4.4000 7.3000
35 4 5.3250 1.2066 4.0000 6.7000
morning_cal_pct:
Level N Mean Std Min Max
------------------------------------------------------------
20 4 6.0750 0.4646 5.6000 6.7000
50 4 5.1000 1.4944 4.0000 7.3000
fiber_g:
Level N Mean Std Min Max
------------------------------------------------------------
15 4 5.1750 1.2230 4.0000 6.7000
40 4 6.0000 1.0646 4.7000 7.3000
Optimization Recommendations
=== Optimization: energy_score ===
Direction: maximize
Best observed run: #4
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 40
Value: 8.7
RSM Model (linear, R² = 0.8297, Adj R² = 0.4038):
Coefficients:
intercept +6.0250
meals_per_day +0.5000
eating_window_hrs +0.3000
protein_pct +0.9500
morning_cal_pct +0.2250
fiber_g -0.0250
Predicted optimum (from linear model, at observed points):
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 40
Predicted value: 7.9750
Surface optimum (via L-BFGS-B, linear model):
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 15
Predicted value: 8.0250
Model quality: Good fit — general trends are captured, some noise remains.
Factor importance:
1. protein_pct (effect: 1.9, contribution: 47.5%)
2. meals_per_day (effect: 1.0, contribution: 25.0%)
3. eating_window_hrs (effect: -0.6, contribution: 15.0%)
4. morning_cal_pct (effect: 0.5, contribution: 11.3%)
5. fiber_g (effect: -0.0, contribution: 1.2%)
=== Optimization: afternoon_alertness ===
Direction: maximize
Best observed run: #4
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 40
Value: 7.3
RSM Model (linear, R² = 0.9695, Adj R² = 0.8931):
Coefficients:
intercept +5.5875
meals_per_day +0.6125
eating_window_hrs +0.2375
protein_pct +0.7875
morning_cal_pct +0.2625
fiber_g +0.0125
Predicted optimum (from linear model, at observed points):
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 40
Predicted value: 7.5000
Surface optimum (via L-BFGS-B, linear model):
meals_per_day = 6
eating_window_hrs = 16
protein_pct = 35
morning_cal_pct = 50
fiber_g = 40
Predicted value: 7.5000
Model quality: Excellent fit — surface predictions are reliable.
Factor importance:
1. protein_pct (effect: 1.6, contribution: 41.2%)
2. meals_per_day (effect: 1.2, contribution: 32.0%)
3. morning_cal_pct (effect: 0.5, contribution: 13.7%)
4. eating_window_hrs (effect: -0.5, contribution: 12.4%)
5. fiber_g (effect: 0.0, contribution: 0.7%)