← All Use Cases
🐾
Fractional Factorial Design

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

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

Experimental Setup

Factors

FactorLowHighUnit
hay_kg612kg/day
grain_kg15kg/day
mineral_g3090g/day
oil_ml0120mL/day
feed_freq24per_day

Fixed: horse_weight = 500kg, activity = moderate

Responses

ResponseDirectionUnit
body_condition↑ maximizepts
hoof_quality↑ maximizepts

Configuration

use_cases/173_horse_feed_ration/config.json
{ "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.

Runhay_kggrain_kgmineral_goil_mlfeed_freq
1659002
21213002
3125301202
4125901204
5653004
61219004
761301204
861901202

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/173_horse_feed_ration/config.json
2

Generate the runner script

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

Terminal
$ bash use_cases/173_horse_feed_ration/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/173_horse_feed_ration/config.json
5

Get optimization recommendations

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

Terminal
$ doe optimize --config use_cases/173_horse_feed_ration/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/173_horse_feed_ration/config.json \ --output use_cases/173_horse_feed_ration/results/report.html

Features Exercised

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

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

SourceDFSSMSFp-value
SourceDFSSMSFp-value
hay_kg10.04500.04500.0230.8843
grain_kg11.80501.80500.9400.3768
mineral_g12.88002.88001.5000.2752
oil_ml10.18000.18000.0940.7718
feed_freq10.00500.00500.0030.9613
hay_kg*grain_kg10.18000.18000.0940.7718
hay_kg*mineral_g10.00500.00500.0030.9613
hay_kg*oil_ml11.80501.80500.9400.3768
hay_kg*feed_freq12.88002.88001.5000.2752
grain_kg*mineral_g13.12503.12501.6280.2581
grain_kg*oil_ml10.04500.04500.0230.8843
grain_kg*feed_freq11.28001.28000.6670.4513
mineral_g*oil_ml11.28001.28000.6670.4513
mineral_g*feed_freq10.04500.04500.0230.8843
oil_ml*feed_freq13.12503.12501.6280.2581
Error(LenthPSE)59.60001.9200
Total79.32001.3314

Pareto Chart

Pareto chart for body_condition

Main Effects Plot

Main effects plot for body_condition

Normal Probability Plot of Effects

Normal probability plot for body_condition

Half-Normal Plot of Effects

Half-normal plot for body_condition

Model Diagnostics

Model diagnostics for body_condition

Response: hoof_quality

Top factors: mineral_g (43.1%), feed_freq (39.7%), grain_kg (13.8%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
hay_kg10.02000.02000.2960.6096
grain_kg10.32000.32004.7410.0814
mineral_g13.12503.125046.2960.0010
oil_ml10.00000.00000.0001.0000
feed_freq12.64502.645039.1850.0015
hay_kg*grain_kg10.00000.00000.0001.0000
hay_kg*mineral_g12.64502.645039.1850.0015
hay_kg*oil_ml10.32000.32004.7410.0814
hay_kg*feed_freq13.12503.125046.2960.0010
grain_kg*mineral_g10.04500.04500.6670.4513
grain_kg*oil_ml10.02000.02000.2960.6096
grain_kg*feed_freq10.40500.40506.0000.0580
mineral_g*oil_ml10.40500.40506.0000.0580
mineral_g*feed_freq10.02000.02000.2960.6096
oil_ml*feed_freq10.04500.04500.6670.4513
Error(LenthPSE)50.33750.0675
Total76.56000.9371

Pareto Chart

Pareto chart for hoof_quality

Main Effects Plot

Main effects plot for hoof_quality

Normal Probability Plot of Effects

Normal probability plot for hoof_quality

Half-Normal Plot of Effects

Half-normal plot for hoof_quality

Model Diagnostics

Model diagnostics for hoof_quality

Response Surface Plots

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

body condition grain kg vs feed freq

RSM surface: body condition grain kg vs feed freq

body condition grain kg vs mineral g

RSM surface: body condition grain kg vs mineral g

body condition grain kg vs oil ml

RSM surface: body condition grain kg vs oil ml

body condition hay kg vs feed freq

RSM surface: body condition hay kg vs feed freq

body condition hay kg vs grain kg

RSM surface: body condition hay kg vs grain kg

body condition hay kg vs mineral g

RSM surface: body condition hay kg vs mineral g

body condition hay kg vs oil ml

RSM surface: body condition hay kg vs oil ml

body condition mineral g vs feed freq

RSM surface: body condition mineral g vs feed freq

body condition mineral g vs oil ml

RSM surface: body condition mineral g vs oil ml

body condition oil ml vs feed freq

RSM surface: body condition oil ml vs feed freq

hoof quality grain kg vs feed freq

RSM surface: hoof quality grain kg vs feed freq

hoof quality grain kg vs mineral g

RSM surface: hoof quality grain kg vs mineral g

hoof quality grain kg vs oil ml

RSM surface: hoof quality grain kg vs oil ml

hoof quality hay kg vs feed freq

RSM surface: hoof quality hay kg vs feed freq

hoof quality hay kg vs grain kg

RSM surface: hoof quality hay kg vs grain kg

hoof quality hay kg vs mineral g

RSM surface: hoof quality hay kg vs mineral g

hoof quality hay kg vs oil ml

RSM surface: hoof quality hay kg vs oil ml

hoof quality mineral g vs feed freq

RSM surface: hoof quality mineral g vs feed freq

hoof quality mineral g vs oil ml

RSM surface: hoof quality mineral g vs oil ml

hoof quality oil ml vs feed freq

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

ResponseWeightDesirabilityPredictedDir
body_condition 1.5
0.9545
7.50 0.9545 7.50 pts
hoof_quality 1.5
0.9545
7.80 0.9545 7.80 pts

Recommended Settings

FactorValue
hay_kg12 kg/day
grain_kg1 kg/day
mineral_g90 g/day
oil_ml0 mL/day
feed_freq4 per_day

Source: from observed run #4

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
hoof_quality7.807.80+0.00

Top 3 Runs by Desirability

RunDFactor Settings
#30.5119hay_kg=6, grain_kg=5, mineral_g=30, oil_ml=0, feed_freq=4
#10.3464hay_kg=12, grain_kg=5, mineral_g=30, oil_ml=120, feed_freq=2

Model Quality

ResponseType
hoof_quality0.4863linear

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

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

doe optimize
=== 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%)
← All Use Cases Next: Reptile Terrarium Setup →