← All Use Cases
🏋
Fractional Factorial Design

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

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

Experimental Setup

Factors

FactorLowHighUnit
meals_per_day26meals
eating_window_hrs816hrs
protein_pct1535%
morning_cal_pct2050%
fiber_g1540g

Fixed: total_calories = 2200, activity_level = moderate

Responses

ResponseDirectionUnit
energy_score↑ maximizepts
afternoon_alertness↑ maximizepts

Configuration

use_cases/114_meal_timing/config.json
{ "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.

Runmeals_per_dayeating_window_hrsprotein_pctmorning_cal_pctfiber_g
1216352015
268152015
3616155015
4616355040
5216152040
668352040
728155040
828355015

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/114_meal_timing/config.json
2

Generate the runner script

Terminal
$ 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

Terminal
$ bash use_cases/114_meal_timing/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/114_meal_timing/config.json
5

Get optimization recommendations

Terminal
$ 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.

Terminal
$ doe optimize --config use_cases/114_meal_timing/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/114_meal_timing/config.json \ --output use_cases/114_meal_timing/results/report.html

Features Exercised

FeatureValue
Design typefractional_factorial
Factor typescontinuous (all 5)
Arg styledouble-dash
Responses2 (energy_score ↑, afternoon_alertness ↑)
Total runs8

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

SourceDFSSMSFp-value
SourceDFSSMSFp-value
meals_per_day10.40500.40500.1870.6836
eating_window_hrs12.64502.64501.2200.3196
protein_pct10.40500.40500.1870.6836
morning_cal_pct10.12500.12500.0580.8198
fiber_g12.64502.64501.2200.3196
meals_per_day*eating_window_hrs10.12500.12500.0580.8198
meals_per_day*protein_pct12.64502.64501.2200.3196
meals_per_day*morning_cal_pct12.64502.64501.2200.3196
meals_per_day*fiber_g10.40500.40500.1870.6836
eating_window_hrs*protein_pct14.80504.80502.2170.1967
eating_window_hrs*morning_cal_pct10.40500.40500.1870.6836
eating_window_hrs*fiber_g11.44501.44500.6670.4513
protein_pct*morning_cal_pct11.44501.44500.6670.4513
protein_pct*fiber_g10.40500.40500.1870.6836
morning_cal_pct*fiber_g14.80504.80502.2170.1967
Error(LenthPSE)510.83752.1675
Total712.47501.7821

Pareto Chart

Pareto chart for energy_score

Main Effects Plot

Main effects plot for energy_score

Normal Probability Plot of Effects

Normal probability plot for energy_score

Half-Normal Plot of Effects

Half-normal plot for energy_score

Model Diagnostics

Model diagnostics for energy_score

Response: afternoon_alertness

Top factors: morning_cal_pct (28.5%), meals_per_day (25.5%), fiber_g (24.1%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
meals_per_day11.53121.53120.6670.4513
eating_window_hrs10.10130.10130.0440.8420
protein_pct10.55120.55120.2400.6449
morning_cal_pct11.90131.90130.8280.4046
fiber_g11.36131.36130.5930.4762
meals_per_day*eating_window_hrs11.90121.90120.8280.4046
meals_per_day*protein_pct11.36121.36120.5930.4762
meals_per_day*morning_cal_pct10.10120.10120.0440.8420
meals_per_day*fiber_g10.55120.55120.2400.6449
eating_window_hrs*protein_pct11.90121.90120.8280.4046
eating_window_hrs*morning_cal_pct11.53121.53120.6670.4513
eating_window_hrs*fiber_g11.90121.90120.8280.4046
protein_pct*morning_cal_pct11.90131.90130.8280.4046
protein_pct*fiber_g11.53121.53120.6670.4513
morning_cal_pct*fiber_g11.90121.90120.8280.4046
Error(LenthPSE)511.48442.2969
Total79.24871.3212

Pareto Chart

Pareto chart for afternoon_alertness

Main Effects Plot

Main effects plot for afternoon_alertness

Normal Probability Plot of Effects

Normal probability plot for afternoon_alertness

Half-Normal Plot of Effects

Half-normal plot for afternoon_alertness

Model Diagnostics

Model diagnostics for afternoon_alertness

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

afternoon alertness eating window hrs vs fiber g

RSM surface: afternoon alertness eating window hrs vs fiber g

afternoon alertness eating window hrs vs morning cal pct

RSM surface: afternoon alertness eating window hrs vs morning cal pct

afternoon alertness eating window hrs vs protein pct

RSM surface: afternoon alertness eating window hrs vs protein pct

afternoon alertness meals per day vs eating window hrs

RSM surface: afternoon alertness meals per day vs eating window hrs

afternoon alertness meals per day vs fiber g

RSM surface: afternoon alertness meals per day vs fiber g

afternoon alertness meals per day vs morning cal pct

RSM surface: afternoon alertness meals per day vs morning cal pct

afternoon alertness meals per day vs protein pct

RSM surface: afternoon alertness meals per day vs protein pct

afternoon alertness morning cal pct vs fiber g

RSM surface: afternoon alertness morning cal pct vs fiber g

afternoon alertness protein pct vs fiber g

RSM surface: afternoon alertness protein pct vs fiber g

afternoon alertness protein pct vs morning cal pct

RSM surface: afternoon alertness protein pct vs morning cal pct

energy score eating window hrs vs fiber g

RSM surface: energy score eating window hrs vs fiber g

energy score eating window hrs vs morning cal pct

RSM surface: energy score eating window hrs vs morning cal pct

energy score eating window hrs vs protein pct

RSM surface: energy score eating window hrs vs protein pct

energy score meals per day vs eating window hrs

RSM surface: energy score meals per day vs eating window hrs

energy score meals per day vs fiber g

RSM surface: energy score meals per day vs fiber g

energy score meals per day vs morning cal pct

RSM surface: energy score meals per day vs morning cal pct

energy score meals per day vs protein pct

RSM surface: energy score meals per day vs protein pct

energy score morning cal pct vs fiber g

RSM surface: energy score morning cal pct vs fiber g

energy score protein pct vs fiber g

RSM surface: energy score protein pct vs fiber g

energy score protein pct vs morning cal pct

RSM surface: 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

ResponseWeightDesirabilityPredictedDir
energy_score 1.0
0.9545
8.70 0.9545 8.70 pts
afternoon_alertness 1.5
0.9545
7.30 0.9545 7.30 pts

Recommended Settings

FactorValue
meals_per_day6 meals
eating_window_hrs16 hrs
protein_pct35 %
morning_cal_pct50 %
fiber_g40 g

Source: from observed run #4

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
afternoon_alertness7.307.30+0.00

Top 3 Runs by Desirability

RunDFactor Settings
#80.6167meals_per_day=6, eating_window_hrs=16, protein_pct=15, morning_cal_pct=50, fiber_g=15
#60.5357meals_per_day=2, eating_window_hrs=8, protein_pct=15, morning_cal_pct=50, fiber_g=40

Model Quality

ResponseType
afternoon_alertness0.7229linear

Full Multi-Objective Output

doe optimize --multi
============================================================ 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

doe analyze
=== 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

doe optimize
=== 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%)
← Previous: Study Session Optimization All Use Cases →