Summary
This experiment investigates horse feed ration balance. Fractional factorial screening of hay ratio, grain amount, mineral supplement, oil supplement, and feeding frequency for weight maintenance and hoof quality.
The design varies 5 factors: hay kg (kg/day), ranging from 6 to 12, grain kg (kg/day), ranging from 1 to 5, mineral g (g/day), ranging from 30 to 90, oil ml (mL/day), ranging from 0 to 120, and feed freq (per_day), ranging from 2 to 4. The goal is to optimize 2 responses: body condition (pts) (maximize) and hoof quality (pts) (maximize). Fixed conditions held constant across all runs include horse weight = 500kg, activity = 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 body condition, the most influential factors were mineral g (45.3%), grain kg (35.8%), oil ml (11.3%). The best observed value was 7.5 (at hay kg = 12, grain kg = 5, mineral g = 90).
For hoof quality, the most influential factors were mineral g (43.1%), feed freq (39.7%), grain kg (13.8%). The best observed value was 7.8 (at hay kg = 12, grain kg = 5, mineral g = 90).
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 |
hay_kg | 6 | 12 | kg/day |
grain_kg | 1 | 5 | kg/day |
mineral_g | 30 | 90 | g/day |
oil_ml | 0 | 120 | mL/day |
feed_freq | 2 | 4 | per_day |
Fixed: horse_weight = 500kg, activity = moderate
Responses
| Response | Direction | Unit |
body_condition | ↑ maximize | pts |
hoof_quality | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "Horse Feed Ration Balance",
"description": "Fractional factorial screening of hay ratio, grain amount, mineral supplement, oil supplement, and feeding frequency for weight maintenance and hoof quality"
},
"factors": [
{
"name": "hay_kg",
"levels": [
"6",
"12"
],
"type": "continuous",
"unit": "kg/day"
},
{
"name": "grain_kg",
"levels": [
"1",
"5"
],
"type": "continuous",
"unit": "kg/day"
},
{
"name": "mineral_g",
"levels": [
"30",
"90"
],
"type": "continuous",
"unit": "g/day"
},
{
"name": "oil_ml",
"levels": [
"0",
"120"
],
"type": "continuous",
"unit": "mL/day"
},
{
"name": "feed_freq",
"levels": [
"2",
"4"
],
"type": "continuous",
"unit": "per_day"
}
],
"fixed_factors": {
"horse_weight": "500kg",
"activity": "moderate"
},
"responses": [
{
"name": "body_condition",
"optimize": "maximize",
"unit": "pts"
},
{
"name": "hoof_quality",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "fractional_factorial",
"test_script": "use_cases/173_horse_feed_ration/sim.sh"
}
}
Experimental Matrix
The Fractional Factorial Design produces 8 runs. Each row is one experiment with specific factor settings.
| Run | hay_kg | grain_kg | mineral_g | oil_ml | feed_freq |
| 1 | 6 | 5 | 90 | 0 | 2 |
| 2 | 12 | 1 | 30 | 0 | 2 |
| 3 | 12 | 5 | 30 | 120 | 2 |
| 4 | 12 | 5 | 90 | 120 | 4 |
| 5 | 6 | 5 | 30 | 0 | 4 |
| 6 | 12 | 1 | 90 | 0 | 4 |
| 7 | 6 | 1 | 30 | 120 | 4 |
| 8 | 6 | 1 | 90 | 120 | 2 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/173_horse_feed_ration/config.json
2
Generate the runner script
$ doe generate --config use_cases/173_horse_feed_ration/config.json \
--output use_cases/173_horse_feed_ration/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/173_horse_feed_ration/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/173_horse_feed_ration/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/173_horse_feed_ration/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/173_horse_feed_ration/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/173_horse_feed_ration/config.json \
--output use_cases/173_horse_feed_ration/results/report.html
Features Exercised
| Feature | Value |
| Design type | fractional_factorial |
| Factor types | continuous (all 5) |
| Arg style | double-dash |
| Responses | 2 (body_condition ↑, hoof_quality ↑) |
| Total runs | 8 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: body_condition
Top factors: mineral_g (45.3%), grain_kg (35.8%), oil_ml (11.3%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| hay_kg | 1 | 0.0450 | 0.0450 | 0.023 | 0.8843 |
| grain_kg | 1 | 1.8050 | 1.8050 | 0.940 | 0.3768 |
| mineral_g | 1 | 2.8800 | 2.8800 | 1.500 | 0.2752 |
| oil_ml | 1 | 0.1800 | 0.1800 | 0.094 | 0.7718 |
| feed_freq | 1 | 0.0050 | 0.0050 | 0.003 | 0.9613 |
| hay_kg*grain_kg | 1 | 0.1800 | 0.1800 | 0.094 | 0.7718 |
| hay_kg*mineral_g | 1 | 0.0050 | 0.0050 | 0.003 | 0.9613 |
| hay_kg*oil_ml | 1 | 1.8050 | 1.8050 | 0.940 | 0.3768 |
| hay_kg*feed_freq | 1 | 2.8800 | 2.8800 | 1.500 | 0.2752 |
| grain_kg*mineral_g | 1 | 3.1250 | 3.1250 | 1.628 | 0.2581 |
| grain_kg*oil_ml | 1 | 0.0450 | 0.0450 | 0.023 | 0.8843 |
| grain_kg*feed_freq | 1 | 1.2800 | 1.2800 | 0.667 | 0.4513 |
| mineral_g*oil_ml | 1 | 1.2800 | 1.2800 | 0.667 | 0.4513 |
| mineral_g*feed_freq | 1 | 0.0450 | 0.0450 | 0.023 | 0.8843 |
| oil_ml*feed_freq | 1 | 3.1250 | 3.1250 | 1.628 | 0.2581 |
| Error | (Lenth | PSE) | 5 | 9.6000 | 1.9200 |
| Total | 7 | 9.3200 | 1.3314 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: hoof_quality
Top factors: mineral_g (43.1%), feed_freq (39.7%), grain_kg (13.8%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| hay_kg | 1 | 0.0200 | 0.0200 | 0.296 | 0.6096 |
| grain_kg | 1 | 0.3200 | 0.3200 | 4.741 | 0.0814 |
| mineral_g | 1 | 3.1250 | 3.1250 | 46.296 | 0.0010 |
| oil_ml | 1 | 0.0000 | 0.0000 | 0.000 | 1.0000 |
| feed_freq | 1 | 2.6450 | 2.6450 | 39.185 | 0.0015 |
| hay_kg*grain_kg | 1 | 0.0000 | 0.0000 | 0.000 | 1.0000 |
| hay_kg*mineral_g | 1 | 2.6450 | 2.6450 | 39.185 | 0.0015 |
| hay_kg*oil_ml | 1 | 0.3200 | 0.3200 | 4.741 | 0.0814 |
| hay_kg*feed_freq | 1 | 3.1250 | 3.1250 | 46.296 | 0.0010 |
| grain_kg*mineral_g | 1 | 0.0450 | 0.0450 | 0.667 | 0.4513 |
| grain_kg*oil_ml | 1 | 0.0200 | 0.0200 | 0.296 | 0.6096 |
| grain_kg*feed_freq | 1 | 0.4050 | 0.4050 | 6.000 | 0.0580 |
| mineral_g*oil_ml | 1 | 0.4050 | 0.4050 | 6.000 | 0.0580 |
| mineral_g*feed_freq | 1 | 0.0200 | 0.0200 | 0.296 | 0.6096 |
| oil_ml*feed_freq | 1 | 0.0450 | 0.0450 | 0.667 | 0.4513 |
| Error | (Lenth | PSE) | 5 | 0.3375 | 0.0675 |
| Total | 7 | 6.5600 | 0.9371 | | |
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.
body condition grain kg vs feed freq
body condition grain kg vs mineral g
body condition grain kg vs oil ml
body condition hay kg vs feed freq
body condition hay kg vs grain kg
body condition hay kg vs mineral g
body condition hay kg vs oil ml
body condition mineral g vs feed freq
body condition mineral g vs oil ml
body condition oil ml vs feed freq
hoof quality grain kg vs feed freq
hoof quality grain kg vs mineral g
hoof quality grain kg vs oil ml
hoof quality hay kg vs feed freq
hoof quality hay kg vs grain kg
hoof quality hay kg vs mineral g
hoof quality hay kg vs oil ml
hoof quality mineral g vs feed freq
hoof quality mineral g vs oil ml
hoof quality oil ml vs feed freq
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 |
body_condition |
1.5 |
|
7.50 0.9545 7.50 pts |
↑ |
hoof_quality |
1.5 |
|
7.80 0.9545 7.80 pts |
↑ |
Recommended Settings
| Factor | Value |
hay_kg | 12 kg/day |
grain_kg | 1 kg/day |
mineral_g | 90 g/day |
oil_ml | 0 mL/day |
feed_freq | 4 per_day |
Source: from observed run #4
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
hoof_quality | 7.80 | 7.80 | +0.00 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #3 | 0.5119 | hay_kg=6, grain_kg=5, mineral_g=30, oil_ml=0, feed_freq=4 |
| #1 | 0.3464 | hay_kg=12, grain_kg=5, mineral_g=30, oil_ml=120, feed_freq=2 |
Model Quality
| Response | R² | Type |
hoof_quality | 0.4863 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.9545
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
body_condition 1.5 0.9545 7.50 pts ↑
hoof_quality 1.5 0.9545 7.80 pts ↑
Recommended settings:
hay_kg = 12 kg/day
grain_kg = 1 kg/day
mineral_g = 90 g/day
oil_ml = 0 mL/day
feed_freq = 4 per_day
(from observed run #4)
Trade-off summary:
body_condition: 7.50 (best observed: 7.50, sacrifice: +0.00)
hoof_quality: 7.80 (best observed: 7.80, sacrifice: +0.00)
Model quality:
body_condition: R² = 0.6567 (linear)
hoof_quality: R² = 0.4863 (linear)
Top 3 observed runs by overall desirability:
1. Run #4 (D=0.9545): hay_kg=12, grain_kg=1, mineral_g=90, oil_ml=0, feed_freq=4
2. Run #3 (D=0.5119): hay_kg=6, grain_kg=5, mineral_g=30, oil_ml=0, feed_freq=4
3. Run #1 (D=0.3464): hay_kg=12, grain_kg=5, mineral_g=30, oil_ml=120, feed_freq=2
Full Analysis Output
=== Main Effects: body_condition ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
mineral_g 1.2000 0.4080 45.3%
grain_kg 0.9500 0.4080 35.8%
oil_ml 0.3000 0.4080 11.3%
hay_kg -0.1500 0.4080 5.7%
feed_freq 0.0500 0.4080 1.9%
=== ANOVA Table: body_condition ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
hay_kg 1 0.0450 0.0450 0.023 0.8843
grain_kg 1 1.8050 1.8050 0.940 0.3768
mineral_g 1 2.8800 2.8800 1.500 0.2752
oil_ml 1 0.1800 0.1800 0.094 0.7718
feed_freq 1 0.0050 0.0050 0.003 0.9613
hay_kg*grain_kg 1 0.1800 0.1800 0.094 0.7718
hay_kg*mineral_g 1 0.0050 0.0050 0.003 0.9613
hay_kg*oil_ml 1 1.8050 1.8050 0.940 0.3768
hay_kg*feed_freq 1 2.8800 2.8800 1.500 0.2752
grain_kg*mineral_g 1 3.1250 3.1250 1.628 0.2581
grain_kg*oil_ml 1 0.0450 0.0450 0.023 0.8843
grain_kg*feed_freq 1 1.2800 1.2800 0.667 0.4513
mineral_g*oil_ml 1 1.2800 1.2800 0.667 0.4513
mineral_g*feed_freq 1 0.0450 0.0450 0.023 0.8843
oil_ml*feed_freq 1 3.1250 3.1250 1.628 0.2581
Error (Lenth PSE) 5 9.6000 1.9200
Total 7 9.3200 1.3314
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: body_condition ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
grain_kg mineral_g 1.2500 18.1%
oil_ml feed_freq 1.2500 18.1%
hay_kg feed_freq -1.2000 17.4%
hay_kg oil_ml -0.9500 13.8%
grain_kg feed_freq 0.8000 11.6%
mineral_g oil_ml 0.8000 11.6%
hay_kg grain_kg -0.3000 4.3%
grain_kg oil_ml 0.1500 2.2%
mineral_g feed_freq 0.1500 2.2%
hay_kg mineral_g -0.0500 0.7%
=== Summary Statistics: body_condition ===
hay_kg:
Level N Mean Std Min Max
------------------------------------------------------------
12 4 5.2250 1.5628 4.2000 7.5000
6 4 5.0750 0.8057 4.4000 6.2000
grain_kg:
Level N Mean Std Min Max
------------------------------------------------------------
1 4 4.6750 0.4425 4.2000 5.1000
5 4 5.6250 1.5196 4.2000 7.5000
mineral_g:
Level N Mean Std Min Max
------------------------------------------------------------
30 4 4.5500 0.3416 4.2000 5.0000
90 4 5.7500 1.4248 4.2000 7.5000
oil_ml:
Level N Mean Std Min Max
------------------------------------------------------------
0 4 5.0000 0.8641 4.2000 6.2000
120 4 5.3000 1.5166 4.2000 7.5000
feed_freq:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 5.1250 0.8221 4.2000 6.2000
4 4 5.1750 1.5586 4.2000 7.5000
=== Main Effects: hoof_quality ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
mineral_g 1.2500 0.3423 43.1%
feed_freq 1.1500 0.3423 39.7%
grain_kg 0.4000 0.3423 13.8%
hay_kg -0.1000 0.3423 3.4%
oil_ml 0.0000 0.3423 0.0%
=== ANOVA Table: hoof_quality ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
hay_kg 1 0.0200 0.0200 0.296 0.6096
grain_kg 1 0.3200 0.3200 4.741 0.0814
mineral_g 1 3.1250 3.1250 46.296 0.0010
oil_ml 1 0.0000 0.0000 0.000 1.0000
feed_freq 1 2.6450 2.6450 39.185 0.0015
hay_kg*grain_kg 1 0.0000 0.0000 0.000 1.0000
hay_kg*mineral_g 1 2.6450 2.6450 39.185 0.0015
hay_kg*oil_ml 1 0.3200 0.3200 4.741 0.0814
hay_kg*feed_freq 1 3.1250 3.1250 46.296 0.0010
grain_kg*mineral_g 1 0.0450 0.0450 0.667 0.4513
grain_kg*oil_ml 1 0.0200 0.0200 0.296 0.6096
grain_kg*feed_freq 1 0.4050 0.4050 6.000 0.0580
mineral_g*oil_ml 1 0.4050 0.4050 6.000 0.0580
mineral_g*feed_freq 1 0.0200 0.0200 0.296 0.6096
oil_ml*feed_freq 1 0.0450 0.0450 0.667 0.4513
Error (Lenth PSE) 5 0.3375 0.0675
Total 7 6.5600 0.9371
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: hoof_quality ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
hay_kg feed_freq -1.2500 29.8%
hay_kg mineral_g -1.1500 27.4%
grain_kg feed_freq 0.4500 10.7%
mineral_g oil_ml 0.4500 10.7%
hay_kg oil_ml -0.4000 9.5%
grain_kg mineral_g 0.1500 3.6%
oil_ml feed_freq 0.1500 3.6%
grain_kg oil_ml 0.1000 2.4%
mineral_g feed_freq 0.1000 2.4%
hay_kg grain_kg 0.0000 0.0%
=== Summary Statistics: hoof_quality ===
hay_kg:
Level N Mean Std Min Max
------------------------------------------------------------
12 4 6.1000 1.4468 4.8000 7.8000
6 4 6.0000 0.2944 5.6000 6.3000
grain_kg:
Level N Mean Std Min Max
------------------------------------------------------------
1 4 5.8500 0.7550 5.0000 6.8000
5 4 6.2500 1.2288 4.8000 7.8000
mineral_g:
Level N Mean Std Min Max
------------------------------------------------------------
30 4 5.4250 0.6752 4.8000 6.3000
90 4 6.6750 0.8302 6.0000 7.8000
oil_ml:
Level N Mean Std Min Max
------------------------------------------------------------
0 4 6.0500 0.7594 5.0000 6.8000
120 4 6.0500 1.2689 4.8000 7.8000
feed_freq:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 5.4750 0.6702 4.8000 6.1000
4 4 6.6250 0.9251 5.6000 7.8000
Optimization Recommendations
=== Optimization: body_condition ===
Direction: maximize
Best observed run: #4
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 120
feed_freq = 4
Value: 7.5
RSM Model (linear, R² = 0.9394, Adj R² = 0.7878):
Coefficients:
intercept +5.1500
hay_kg +0.5250
grain_kg +0.3500
mineral_g +0.6000
oil_ml -0.0750
feed_freq +0.5750
Predicted optimum (from linear model, at observed points):
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 120
feed_freq = 4
Predicted value: 7.1250
Surface optimum (via L-BFGS-B, linear model):
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 0
feed_freq = 4
Predicted value: 7.2750
Model quality: Excellent fit — surface predictions are reliable.
Factor importance:
1. mineral_g (effect: 1.2, contribution: 28.2%)
2. feed_freq (effect: 1.1, contribution: 27.1%)
3. hay_kg (effect: -1.0, contribution: 24.7%)
4. grain_kg (effect: 0.7, contribution: 16.5%)
5. oil_ml (effect: -0.1, contribution: 3.5%)
=== Optimization: hoof_quality ===
Direction: maximize
Best observed run: #4
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 120
feed_freq = 4
Value: 7.8
RSM Model (linear, R² = 0.7424, Adj R² = 0.0983):
Coefficients:
intercept +6.0500
hay_kg +0.4000
grain_kg +0.0500
mineral_g +0.6250
oil_ml +0.2000
feed_freq -0.1250
Predicted optimum (from linear model, at observed points):
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 120
feed_freq = 4
Predicted value: 7.2000
Surface optimum (via L-BFGS-B, linear model):
hay_kg = 12
grain_kg = 5
mineral_g = 90
oil_ml = 120
feed_freq = 2
Predicted value: 7.4500
Model quality: Good fit — general trends are captured, some noise remains.
Factor importance:
1. mineral_g (effect: 1.2, contribution: 44.6%)
2. hay_kg (effect: -0.8, contribution: 28.6%)
3. oil_ml (effect: 0.4, contribution: 14.3%)
4. feed_freq (effect: -0.2, contribution: 8.9%)
5. grain_kg (effect: 0.1, contribution: 3.6%)