Summary
This experiment investigates hoof trimming schedule. Fractional factorial screening of trim interval, heel height, toe angle, weight distribution, and exercise hours for lameness prevention and hoof health.
The design varies 5 factors: trim weeks (weeks), ranging from 6 to 16, heel height mm (mm), ranging from 20 to 40, toe angle deg (deg), ranging from 45 to 55, balance pct (%), ranging from 45 to 55, and exercise hrs (hrs), ranging from 2 to 8. The goal is to optimize 2 responses: lameness score (pts) (minimize) and hoof health (pts) (maximize). Fixed conditions held constant across all runs include animal = dairy_cow, surface = concrete_rubber.
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 lameness score, the most influential factors were exercise hrs (38.3%), trim weeks (25.2%), toe angle deg (19.6%). The best observed value was 1.2 (at trim weeks = 16, heel height mm = 20, toe angle deg = 45).
For hoof health, the most influential factors were exercise hrs (47.3%), toe angle deg (18.7%), trim weeks (14.3%). The best observed value was 7.0 (at trim weeks = 16, heel height mm = 20, toe angle deg = 45).
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 |
trim_weeks | 6 | 16 | weeks |
heel_height_mm | 20 | 40 | mm |
toe_angle_deg | 45 | 55 | deg |
balance_pct | 45 | 55 | % |
exercise_hrs | 2 | 8 | hrs |
Fixed: animal = dairy_cow, surface = concrete_rubber
Responses
| Response | Direction | Unit |
lameness_score | ↓ minimize | pts |
hoof_health | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "Hoof Trimming Schedule",
"description": "Fractional factorial screening of trim interval, heel height, toe angle, weight distribution, and exercise hours for lameness prevention and hoof health"
},
"factors": [
{
"name": "trim_weeks",
"levels": [
"6",
"16"
],
"type": "continuous",
"unit": "weeks"
},
{
"name": "heel_height_mm",
"levels": [
"20",
"40"
],
"type": "continuous",
"unit": "mm"
},
{
"name": "toe_angle_deg",
"levels": [
"45",
"55"
],
"type": "continuous",
"unit": "deg"
},
{
"name": "balance_pct",
"levels": [
"45",
"55"
],
"type": "continuous",
"unit": "%"
},
{
"name": "exercise_hrs",
"levels": [
"2",
"8"
],
"type": "continuous",
"unit": "hrs"
}
],
"fixed_factors": {
"animal": "dairy_cow",
"surface": "concrete_rubber"
},
"responses": [
{
"name": "lameness_score",
"optimize": "minimize",
"unit": "pts"
},
{
"name": "hoof_health",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "fractional_factorial",
"test_script": "use_cases/297_hoof_trimming/sim.sh"
}
}
Experimental Matrix
The Fractional Factorial Design produces 8 runs. Each row is one experiment with specific factor settings.
| Run | trim_weeks | heel_height_mm | toe_angle_deg | balance_pct | exercise_hrs |
| 1 | 6 | 40 | 55 | 45 | 2 |
| 2 | 16 | 20 | 45 | 45 | 2 |
| 3 | 16 | 40 | 45 | 55 | 2 |
| 4 | 16 | 40 | 55 | 55 | 8 |
| 5 | 6 | 40 | 45 | 45 | 8 |
| 6 | 16 | 20 | 55 | 45 | 8 |
| 7 | 6 | 20 | 45 | 55 | 8 |
| 8 | 6 | 20 | 55 | 55 | 2 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/297_hoof_trimming/config.json
2
Generate the runner script
$ doe generate --config use_cases/297_hoof_trimming/config.json \
--output use_cases/297_hoof_trimming/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/297_hoof_trimming/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/297_hoof_trimming/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/297_hoof_trimming/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/297_hoof_trimming/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/297_hoof_trimming/config.json \
--output use_cases/297_hoof_trimming/results/report.html
Features Exercised
| Feature | Value |
| Design type | fractional_factorial |
| Factor types | continuous (all 5) |
| Arg style | double-dash |
| Responses | 2 (lameness_score ↓, hoof_health ↑) |
| Total runs | 8 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: lameness_score
Top factors: exercise_hrs (38.3%), trim_weeks (25.2%), toe_angle_deg (19.6%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| trim_weeks | 1 | 0.9112 | 0.9112 | 1.682 | 0.2513 |
| heel_height_mm | 1 | 0.2813 | 0.2813 | 0.519 | 0.5035 |
| toe_angle_deg | 1 | 0.5512 | 0.5512 | 1.017 | 0.3594 |
| balance_pct | 1 | 0.0112 | 0.0112 | 0.021 | 0.8911 |
| exercise_hrs | 1 | 2.1012 | 2.1012 | 3.878 | 0.1060 |
| trim_weeks*heel_height_mm | 1 | 0.0113 | 0.0113 | 0.021 | 0.8911 |
| trim_weeks*toe_angle_deg | 1 | 2.1013 | 2.1013 | 3.878 | 0.1060 |
| trim_weeks*balance_pct | 1 | 0.2813 | 0.2813 | 0.519 | 0.5035 |
| trim_weeks*exercise_hrs | 1 | 0.5513 | 0.5513 | 1.017 | 0.3594 |
| heel_height_mm*toe_angle_deg | 1 | 0.0113 | 0.0113 | 0.021 | 0.8911 |
| heel_height_mm*balance_pct | 1 | 0.9112 | 0.9112 | 1.682 | 0.2513 |
| heel_height_mm*exercise_hrs | 1 | 0.3613 | 0.3613 | 0.667 | 0.4513 |
| toe_angle_deg*balance_pct | 1 | 0.3613 | 0.3613 | 0.667 | 0.4513 |
| toe_angle_deg*exercise_hrs | 1 | 0.9113 | 0.9113 | 1.682 | 0.2513 |
| balance_pct*exercise_hrs | 1 | 0.0113 | 0.0113 | 0.021 | 0.8911 |
| Error | (Lenth | PSE) | 5 | 2.7094 | 0.5419 |
| Total | 7 | 4.2288 | 0.6041 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: hoof_health
Top factors: exercise_hrs (47.3%), toe_angle_deg (18.7%), trim_weeks (14.3%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| trim_weeks | 1 | 0.2113 | 0.2113 | 0.667 | 0.4513 |
| heel_height_mm | 1 | 0.2113 | 0.2113 | 0.667 | 0.4513 |
| toe_angle_deg | 1 | 0.3612 | 0.3612 | 1.140 | 0.3345 |
| balance_pct | 1 | 0.0312 | 0.0312 | 0.099 | 0.7662 |
| exercise_hrs | 1 | 2.3113 | 2.3113 | 7.294 | 0.0427 |
| trim_weeks*heel_height_mm | 1 | 0.0312 | 0.0312 | 0.099 | 0.7662 |
| trim_weeks*toe_angle_deg | 1 | 2.3113 | 2.3113 | 7.294 | 0.0427 |
| trim_weeks*balance_pct | 1 | 0.2112 | 0.2112 | 0.667 | 0.4513 |
| trim_weeks*exercise_hrs | 1 | 0.3613 | 0.3613 | 1.140 | 0.3345 |
| heel_height_mm*toe_angle_deg | 1 | 0.2812 | 0.2812 | 0.888 | 0.3894 |
| heel_height_mm*balance_pct | 1 | 0.2112 | 0.2112 | 0.667 | 0.4513 |
| heel_height_mm*exercise_hrs | 1 | 0.4513 | 0.4513 | 1.424 | 0.2863 |
| toe_angle_deg*balance_pct | 1 | 0.4513 | 0.4513 | 1.424 | 0.2863 |
| toe_angle_deg*exercise_hrs | 1 | 0.2113 | 0.2113 | 0.667 | 0.4513 |
| balance_pct*exercise_hrs | 1 | 0.2812 | 0.2812 | 0.888 | 0.3894 |
| Error | (Lenth | PSE) | 5 | 1.5844 | 0.3169 |
| Total | 7 | 3.8588 | 0.5513 | | |
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.
hoof health balance pct vs exercise hrs
hoof health heel height mm vs balance pct
hoof health heel height mm vs exercise hrs
hoof health heel height mm vs toe angle deg
hoof health toe angle deg vs balance pct
hoof health toe angle deg vs exercise hrs
hoof health trim weeks vs balance pct
hoof health trim weeks vs exercise hrs
hoof health trim weeks vs heel height mm
hoof health trim weeks vs toe angle deg
lameness score balance pct vs exercise hrs
lameness score heel height mm vs balance pct
lameness score heel height mm vs exercise hrs
lameness score heel height mm vs toe angle deg
lameness score toe angle deg vs balance pct
lameness score toe angle deg vs exercise hrs
lameness score trim weeks vs balance pct
lameness score trim weeks vs exercise hrs
lameness score trim weeks vs heel height mm
lameness score trim weeks vs toe angle deg
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 |
lameness_score |
1.5 |
|
1.20 0.9545 1.20 pts |
↓ |
hoof_health |
2.0 |
|
7.00 0.9545 7.00 pts |
↑ |
Recommended Settings
| Factor | Value |
trim_weeks | 6 weeks |
heel_height_mm | 20 mm |
toe_angle_deg | 55 deg |
balance_pct | 55 % |
exercise_hrs | 2 hrs |
Source: from observed run #5
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
hoof_health | 7.00 | 7.00 | +0.00 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #1 | 0.7747 | trim_weeks=16, heel_height_mm=20, toe_angle_deg=45, balance_pct=45, exercise_hrs=2 |
| #7 | 0.4937 | trim_weeks=6, heel_height_mm=40, toe_angle_deg=55, balance_pct=45, exercise_hrs=2 |
Model Quality
| Response | R² | Type |
hoof_health | 0.4525 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.9545
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
lameness_score 1.5 0.9545 1.20 pts ↓
hoof_health 2.0 0.9545 7.00 pts ↑
Recommended settings:
trim_weeks = 6 weeks
heel_height_mm = 20 mm
toe_angle_deg = 55 deg
balance_pct = 55 %
exercise_hrs = 2 hrs
(from observed run #5)
Trade-off summary:
lameness_score: 1.20 (best observed: 1.20, sacrifice: +0.00)
hoof_health: 7.00 (best observed: 7.00, sacrifice: +0.00)
Model quality:
lameness_score: R² = 0.8410 (linear)
hoof_health: R² = 0.4525 (linear)
Top 3 observed runs by overall desirability:
1. Run #5 (D=0.9545): trim_weeks=6, heel_height_mm=20, toe_angle_deg=55, balance_pct=55, exercise_hrs=2
2. Run #1 (D=0.7747): trim_weeks=16, heel_height_mm=20, toe_angle_deg=45, balance_pct=45, exercise_hrs=2
3. Run #7 (D=0.4937): trim_weeks=6, heel_height_mm=40, toe_angle_deg=55, balance_pct=45, exercise_hrs=2
Full Analysis Output
=== Main Effects: lameness_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
exercise_hrs 1.0250 0.2748 38.3%
trim_weeks 0.6750 0.2748 25.2%
toe_angle_deg 0.5250 0.2748 19.6%
heel_height_mm -0.3750 0.2748 14.0%
balance_pct -0.0750 0.2748 2.8%
=== ANOVA Table: lameness_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
trim_weeks 1 0.9112 0.9112 1.682 0.2513
heel_height_mm 1 0.2813 0.2813 0.519 0.5035
toe_angle_deg 1 0.5512 0.5512 1.017 0.3594
balance_pct 1 0.0112 0.0112 0.021 0.8911
exercise_hrs 1 2.1012 2.1012 3.878 0.1060
trim_weeks*heel_height_mm 1 0.0113 0.0113 0.021 0.8911
trim_weeks*toe_angle_deg 1 2.1013 2.1013 3.878 0.1060
trim_weeks*balance_pct 1 0.2813 0.2813 0.519 0.5035
trim_weeks*exercise_hrs 1 0.5513 0.5513 1.017 0.3594
heel_height_mm*toe_angle_deg 1 0.0113 0.0113 0.021 0.8911
heel_height_mm*balance_pct 1 0.9112 0.9112 1.682 0.2513
heel_height_mm*exercise_hrs 1 0.3613 0.3613 0.667 0.4513
toe_angle_deg*balance_pct 1 0.3613 0.3613 0.667 0.4513
toe_angle_deg*exercise_hrs 1 0.9113 0.9113 1.682 0.2513
balance_pct*exercise_hrs 1 0.0113 0.0113 0.021 0.8911
Error (Lenth PSE) 5 2.7094 0.5419
Total 7 4.2288 0.6041
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: lameness_score ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
trim_weeks toe_angle_deg -1.0250 23.6%
heel_height_mm balance_pct -0.6750 15.5%
toe_angle_deg exercise_hrs -0.6750 15.5%
trim_weeks exercise_hrs -0.5250 12.1%
heel_height_mm exercise_hrs 0.4250 9.8%
toe_angle_deg balance_pct 0.4250 9.8%
trim_weeks balance_pct 0.3750 8.6%
heel_height_mm toe_angle_deg -0.0750 1.7%
balance_pct exercise_hrs -0.0750 1.7%
trim_weeks heel_height_mm 0.0750 1.7%
=== Summary Statistics: lameness_score ===
trim_weeks:
Level N Mean Std Min Max
------------------------------------------------------------
16 4 2.3750 0.9535 1.2000 3.2000
6 4 3.0500 0.4435 2.4000 3.4000
heel_height_mm:
Level N Mean Std Min Max
------------------------------------------------------------
20 4 2.9000 0.6000 2.0000 3.2000
40 4 2.5250 0.9777 1.2000 3.4000
toe_angle_deg:
Level N Mean Std Min Max
------------------------------------------------------------
45 4 2.4500 1.0376 1.2000 3.4000
55 4 2.9750 0.3862 2.4000 3.2000
balance_pct:
Level N Mean Std Min Max
------------------------------------------------------------
45 4 2.7500 0.6608 2.0000 3.4000
55 4 2.6750 0.9845 1.2000 3.2000
exercise_hrs:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 2.2000 0.8327 1.2000 3.2000
8 4 3.2250 0.1258 3.1000 3.4000
=== Main Effects: hoof_health ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
exercise_hrs -1.0750 0.2625 47.3%
toe_angle_deg -0.4250 0.2625 18.7%
trim_weeks -0.3250 0.2625 14.3%
heel_height_mm 0.3250 0.2625 14.3%
balance_pct -0.1250 0.2625 5.5%
=== ANOVA Table: hoof_health ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
trim_weeks 1 0.2113 0.2113 0.667 0.4513
heel_height_mm 1 0.2113 0.2113 0.667 0.4513
toe_angle_deg 1 0.3612 0.3612 1.140 0.3345
balance_pct 1 0.0312 0.0312 0.099 0.7662
exercise_hrs 1 2.3113 2.3113 7.294 0.0427
trim_weeks*heel_height_mm 1 0.0312 0.0312 0.099 0.7662
trim_weeks*toe_angle_deg 1 2.3113 2.3113 7.294 0.0427
trim_weeks*balance_pct 1 0.2112 0.2112 0.667 0.4513
trim_weeks*exercise_hrs 1 0.3613 0.3613 1.140 0.3345
heel_height_mm*toe_angle_deg 1 0.2812 0.2812 0.888 0.3894
heel_height_mm*balance_pct 1 0.2112 0.2112 0.667 0.4513
heel_height_mm*exercise_hrs 1 0.4513 0.4513 1.424 0.2863
toe_angle_deg*balance_pct 1 0.4513 0.4513 1.424 0.2863
toe_angle_deg*exercise_hrs 1 0.2113 0.2113 0.667 0.4513
balance_pct*exercise_hrs 1 0.2812 0.2812 0.888 0.3894
Error (Lenth PSE) 5 1.5844 0.3169
Total 7 3.8588 0.5513
Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design)
=== Interaction Effects: hoof_health ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
trim_weeks toe_angle_deg 1.0750 25.0%
heel_height_mm exercise_hrs 0.4750 11.0%
toe_angle_deg balance_pct 0.4750 11.0%
trim_weeks exercise_hrs 0.4250 9.9%
heel_height_mm toe_angle_deg -0.3750 8.7%
balance_pct exercise_hrs -0.3750 8.7%
trim_weeks balance_pct -0.3250 7.6%
heel_height_mm balance_pct 0.3250 7.6%
toe_angle_deg exercise_hrs 0.3250 7.6%
trim_weeks heel_height_mm 0.1250 2.9%
=== Summary Statistics: hoof_health ===
trim_weeks:
Level N Mean Std Min Max
------------------------------------------------------------
16 4 6.2000 0.8756 5.3000 7.0000
6 4 5.8750 0.6702 4.9000 6.4000
heel_height_mm:
Level N Mean Std Min Max
------------------------------------------------------------
20 4 5.8750 0.9323 4.9000 6.9000
40 4 6.2000 0.5888 5.6000 7.0000
toe_angle_deg:
Level N Mean Std Min Max
------------------------------------------------------------
45 4 6.2500 0.9678 4.9000 7.0000
55 4 5.8250 0.4787 5.3000 6.4000
balance_pct:
Level N Mean Std Min Max
------------------------------------------------------------
45 4 6.1000 0.6583 5.3000 6.9000
55 4 5.9750 0.9179 4.9000 7.0000
exercise_hrs:
Level N Mean Std Min Max
------------------------------------------------------------
2 4 6.5750 0.4646 6.0000 7.0000
8 4 5.5000 0.5477 4.9000 6.2000
Optimization Recommendations
=== Optimization: lameness_score ===
Direction: minimize
Best observed run: #5
trim_weeks = 16
heel_height_mm = 20
toe_angle_deg = 45
balance_pct = 45
exercise_hrs = 2
Value: 1.2
RSM Model (linear, R² = 0.6589, Adj R² = -0.1939):
Coefficients:
intercept +2.7125
trim_weeks -0.5125
heel_height_mm +0.0375
toe_angle_deg +0.1625
balance_pct -0.0375
exercise_hrs +0.2375
Predicted optimum (from linear model, at observed points):
trim_weeks = 6
heel_height_mm = 40
toe_angle_deg = 45
balance_pct = 45
exercise_hrs = 8
Predicted value: 3.3750
Surface optimum (via L-BFGS-B, linear model):
trim_weeks = 16
heel_height_mm = 20
toe_angle_deg = 45
balance_pct = 55
exercise_hrs = 2
Predicted value: 1.7250
Model quality: Moderate fit — use predictions directionally, not precisely.
Factor importance:
1. trim_weeks (effect: 1.0, contribution: 51.9%)
2. exercise_hrs (effect: 0.5, contribution: 24.1%)
3. toe_angle_deg (effect: 0.3, contribution: 16.5%)
4. balance_pct (effect: -0.1, contribution: 3.8%)
5. heel_height_mm (effect: 0.1, contribution: 3.8%)
=== Optimization: hoof_health ===
Direction: maximize
Best observed run: #5
trim_weeks = 16
heel_height_mm = 20
toe_angle_deg = 45
balance_pct = 45
exercise_hrs = 2
Value: 7.0
RSM Model (linear, R² = 0.5458, Adj R² = -0.5896):
Coefficients:
intercept +6.0375
trim_weeks +0.2625
heel_height_mm -0.0375
toe_angle_deg -0.3625
balance_pct +0.1875
exercise_hrs +0.1625
Predicted optimum (from linear model, at observed points):
trim_weeks = 16
heel_height_mm = 40
toe_angle_deg = 45
balance_pct = 55
exercise_hrs = 2
Predicted value: 6.6500
Surface optimum (via L-BFGS-B, linear model):
trim_weeks = 16
heel_height_mm = 20
toe_angle_deg = 45
balance_pct = 55
exercise_hrs = 8
Predicted value: 7.0500
Model quality: Moderate fit — use predictions directionally, not precisely.
Factor importance:
1. toe_angle_deg (effect: -0.7, contribution: 35.8%)
2. trim_weeks (effect: -0.5, contribution: 25.9%)
3. balance_pct (effect: 0.4, contribution: 18.5%)
4. exercise_hrs (effect: 0.3, contribution: 16.0%)
5. heel_height_mm (effect: -0.1, contribution: 3.7%)