← All Use Cases
🐾
Box-Behnken Design

Dog Kibble Formulation

Box-Behnken design to maximize palatability and coat condition by tuning protein content, fat percentage, and fiber content

Summary

This experiment investigates dog kibble formulation. Box-Behnken design to maximize palatability and coat condition by tuning protein content, fat percentage, and fiber content.

The design varies 3 factors: protein pct (%), ranging from 20 to 35, fat pct (%), ranging from 8 to 18, and fiber pct (%), ranging from 2 to 6. The goal is to optimize 2 responses: palatability (pts) (maximize) and coat score (pts) (maximize). Fixed conditions held constant across all runs include breed size = medium, life stage = adult.

A Box-Behnken design was chosen because it efficiently fits quadratic models with 3 continuous factors while avoiding extreme corner combinations — requiring only 15 runs instead of the 8 needed for a full factorial at two levels.

Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.

Key Findings

For palatability, the most influential factors were fiber pct (49.2%), protein pct (35.8%), fat pct (15.1%). The best observed value was 7.7 (at protein pct = 35, fat pct = 8, fiber pct = 4).

For coat score, the most influential factors were fiber pct (47.8%), protein pct (38.9%), fat pct (13.3%). The best observed value was 6.9 (at protein pct = 35, fat pct = 18, fiber pct = 4).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
protein_pct2035%
fat_pct818%
fiber_pct26%

Fixed: breed_size = medium, life_stage = adult

Responses

ResponseDirectionUnit
palatability↑ maximizepts
coat_score↑ maximizepts

Configuration

use_cases/167_dog_kibble_formulation/config.json
{ "metadata": { "name": "Dog Kibble Formulation", "description": "Box-Behnken design to maximize palatability and coat condition by tuning protein content, fat percentage, and fiber content" }, "factors": [ { "name": "protein_pct", "levels": [ "20", "35" ], "type": "continuous", "unit": "%" }, { "name": "fat_pct", "levels": [ "8", "18" ], "type": "continuous", "unit": "%" }, { "name": "fiber_pct", "levels": [ "2", "6" ], "type": "continuous", "unit": "%" } ], "fixed_factors": { "breed_size": "medium", "life_stage": "adult" }, "responses": [ { "name": "palatability", "optimize": "maximize", "unit": "pts" }, { "name": "coat_score", "optimize": "maximize", "unit": "pts" } ], "settings": { "operation": "box_behnken", "test_script": "use_cases/167_dog_kibble_formulation/sim.sh" } }

Experimental Matrix

The Box-Behnken Design produces 15 runs. Each row is one experiment with specific factor settings.

Runprotein_pctfat_pctfiber_pct
127.582
227.5134
335136
435132
527.5134
627.5134
720136
83584
927.586
1035184
1120132
1227.5186
132084
1420184
1527.5182

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/167_dog_kibble_formulation/config.json
2

Generate the runner script

Terminal
$ doe generate --config use_cases/167_dog_kibble_formulation/config.json \ --output use_cases/167_dog_kibble_formulation/results/run.sh --seed 42
3

Execute the experiments

Terminal
$ bash use_cases/167_dog_kibble_formulation/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/167_dog_kibble_formulation/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/167_dog_kibble_formulation/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/167_dog_kibble_formulation/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/167_dog_kibble_formulation/config.json \ --output use_cases/167_dog_kibble_formulation/results/report.html

Features Exercised

FeatureValue
Design typebox_behnken
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (palatability ↑, coat_score ↑)
Total runs15

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: palatability

Top factors: fiber_pct (49.2%), protein_pct (35.8%), fat_pct (15.1%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
protein_pct22.10971.05490.6190.5623
fat_pct20.51220.25610.1500.8628
fiber_pct23.83791.91901.1270.3706
LackofFit66.45751.0762
PureError23.4067
Error89.86411.7033
Total1416.32401.1660

Pareto Chart

Pareto chart for palatability

Main Effects Plot

Main effects plot for palatability

Normal Probability Plot of Effects

Normal probability plot for palatability

Half-Normal Plot of Effects

Half-normal plot for palatability

Model Diagnostics

Model diagnostics for palatability

Response: coat_score

Top factors: fiber_pct (47.8%), protein_pct (38.9%), fat_pct (13.3%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
protein_pct21.58470.79230.3810.6950
fat_pct20.18580.09290.0450.9566
fiber_pct22.66751.33380.6410.5517
LackofFit61.23130.2052
PureError24.1600
Error85.39132.0800
Total149.82930.7021

Pareto Chart

Pareto chart for coat_score

Main Effects Plot

Main effects plot for coat_score

Normal Probability Plot of Effects

Normal probability plot for coat_score

Half-Normal Plot of Effects

Half-normal plot for coat_score

Model Diagnostics

Model diagnostics for coat_score

Response Surface Plots

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

coat score fat pct vs fiber pct

RSM surface: coat score fat pct vs fiber pct

coat score protein pct vs fat pct

RSM surface: coat score protein pct vs fat pct

coat score protein pct vs fiber pct

RSM surface: coat score protein pct vs fiber pct

palatability fat pct vs fiber pct

RSM surface: palatability fat pct vs fiber pct

palatability protein pct vs fat pct

RSM surface: palatability protein pct vs fat pct

palatability protein pct vs fiber pct

RSM surface: palatability protein pct vs fiber 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.9382

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
palatability 1.5
0.9545
7.70 0.9545 7.70 pts
coat_score 1.5
0.9221
6.80 0.9221 6.80 pts

Recommended Settings

FactorValue
protein_pct27.5 %
fat_pct13 %
fiber_pct4 %

Source: from observed run #10

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
coat_score6.806.90+0.10

Top 3 Runs by Desirability

RunDFactor Settings
#150.8102protein_pct=20, fat_pct=8, fiber_pct=4
#120.7983protein_pct=27.5, fat_pct=8, fiber_pct=2

Model Quality

ResponseType
coat_score0.1063linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.9382 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- palatability 1.5 0.9545 7.70 pts ↑ coat_score 1.5 0.9221 6.80 pts ↑ Recommended settings: protein_pct = 27.5 % fat_pct = 13 % fiber_pct = 4 % (from observed run #10) Trade-off summary: palatability: 7.70 (best observed: 7.70, sacrifice: +0.00) coat_score: 6.80 (best observed: 6.90, sacrifice: +0.10) Model quality: palatability: R² = 0.6683 (quadratic) coat_score: R² = 0.1063 (linear) Top 3 observed runs by overall desirability: 1. Run #10 (D=0.9382): protein_pct=27.5, fat_pct=13, fiber_pct=4 2. Run #15 (D=0.8102): protein_pct=20, fat_pct=8, fiber_pct=4 3. Run #12 (D=0.7983): protein_pct=27.5, fat_pct=8, fiber_pct=2

Full Analysis Output

doe analyze
=== Main Effects: palatability === Factor Effect Std Error % Contribution -------------------------------------------------------------- fiber_pct 1.3750 0.2788 49.2% protein_pct 1.0000 0.2788 35.8% fat_pct 0.4214 0.2788 15.1% === ANOVA Table: palatability === Source DF SS MS F p-value ----------------------------------------------------------------------------- protein_pct 2 2.1097 1.0549 0.619 0.5623 fat_pct 2 0.5122 0.2561 0.150 0.8628 fiber_pct 2 3.8379 1.9190 1.127 0.3706 Lack of Fit 6 6.4575 1.0762 0.632 0.7194 Pure Error 2 3.4067 1.7033 Error 8 9.8641 1.7033 Total 14 16.3240 1.1660 === Summary Statistics: palatability === protein_pct: Level N Mean Std Min Max ------------------------------------------------------------ 20 4 6.7000 1.2302 5.0000 7.7000 27.5 7 6.0286 0.9844 4.4000 7.0000 35 4 5.7000 1.1343 4.2000 6.8000 fat_pct: Level N Mean Std Min Max ------------------------------------------------------------ 13 7 5.9286 0.9725 4.4000 6.9000 18 4 6.3500 1.0344 5.0000 7.5000 8 4 6.2250 1.5196 4.2000 7.7000 fiber_pct: Level N Mean Std Min Max ------------------------------------------------------------ 2 4 5.3750 0.4787 5.0000 6.0000 4 7 6.1857 1.3957 4.2000 7.7000 6 4 6.7500 0.1915 6.6000 7.0000 === Main Effects: coat_score === Factor Effect Std Error % Contribution -------------------------------------------------------------- fiber_pct 1.0750 0.2163 47.8% protein_pct 0.8750 0.2163 38.9% fat_pct 0.3000 0.2163 13.3% === ANOVA Table: coat_score === Source DF SS MS F p-value ----------------------------------------------------------------------------- protein_pct 2 1.5847 0.7923 0.381 0.6950 fat_pct 2 0.1858 0.0929 0.045 0.9566 fiber_pct 2 2.6675 1.3338 0.641 0.5517 Lack of Fit 6 1.2313 0.2052 0.099 0.9881 Pure Error 2 4.1600 2.0800 Error 8 5.3913 2.0800 Total 14 9.8293 0.7021 === Summary Statistics: coat_score === protein_pct: Level N Mean Std Min Max ------------------------------------------------------------ 20 4 6.1000 0.5292 5.6000 6.8000 27.5 7 5.5429 1.0533 4.1000 6.9000 35 4 5.2250 0.4992 4.7000 5.9000 fat_pct: Level N Mean Std Min Max ------------------------------------------------------------ 13 7 5.5857 0.9245 4.1000 6.9000 18 4 5.4750 0.6397 4.8000 6.2000 8 4 5.7750 1.0468 4.6000 6.8000 fiber_pct: Level N Mean Std Min Max ------------------------------------------------------------ 2 4 4.9250 0.4573 4.6000 5.6000 4 7 5.7714 1.0161 4.1000 6.9000 6 4 6.0000 0.3367 5.8000 6.5000

Optimization Recommendations

doe optimize
=== Optimization: palatability === Direction: maximize Best observed run: #10 protein_pct = 35 fat_pct = 8 fiber_pct = 4 Value: 7.7 RSM Model (linear, R² = 0.0466, Adj R² = -0.2135): Coefficients: intercept +6.1200 protein_pct -0.1000 fat_pct +0.1500 fiber_pct -0.2500 RSM Model (quadratic, R² = 0.6997, Adj R² = 0.1592): Coefficients: intercept +6.3667 protein_pct -0.1000 fat_pct +0.1500 fiber_pct -0.2500 protein_pct*fat_pct -0.5250 protein_pct*fiber_pct -0.8250 fat_pct*fiber_pct -0.7250 protein_pct^2 +0.5792 fat_pct^2 -0.1208 fiber_pct^2 -0.9208 Curvature analysis: fiber_pct coef=-0.9208 concave (has a maximum) protein_pct coef=+0.5792 convex (has a minimum) fat_pct coef=-0.1208 concave (has a maximum) Notable interactions: protein_pct*fiber_pct coef=-0.8250 (antagonistic) fat_pct*fiber_pct coef=-0.7250 (antagonistic) protein_pct*fat_pct coef=-0.5250 (antagonistic) Predicted optimum (from quadratic model, at observed points): protein_pct = 20 fat_pct = 18 fiber_pct = 4 Predicted value: 7.6000 Surface optimum (via L-BFGS-B, quadratic model): protein_pct = 20 fat_pct = 18 fiber_pct = 3.8371 Predicted value: 7.6061 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. fiber_pct (effect: 1.2, contribution: 53.3%) 2. protein_pct (effect: 0.8, contribution: 33.4%) 3. fat_pct (effect: 0.3, contribution: 13.3%) === Optimization: coat_score === Direction: maximize Best observed run: #3 protein_pct = 35 fat_pct = 18 fiber_pct = 4 Value: 6.9 RSM Model (linear, R² = 0.1806, Adj R² = -0.0429): Coefficients: intercept +5.6067 protein_pct +0.2250 fat_pct +0.3750 fiber_pct -0.1750 RSM Model (quadratic, R² = 0.8209, Adj R² = 0.4986): Coefficients: intercept +5.6000 protein_pct +0.2250 fat_pct +0.3750 fiber_pct -0.1750 protein_pct*fat_pct -0.3250 protein_pct*fiber_pct -0.8250 fat_pct*fiber_pct +0.0750 protein_pct^2 +0.2875 fat_pct^2 +0.4375 fiber_pct^2 -0.7125 Curvature analysis: fiber_pct coef=-0.7125 concave (has a maximum) fat_pct coef=+0.4375 convex (has a minimum) protein_pct coef=+0.2875 convex (has a minimum) Notable interactions: protein_pct*fiber_pct coef=-0.8250 (antagonistic) protein_pct*fat_pct coef=-0.3250 (antagonistic) Predicted optimum (from quadratic model, at observed points): protein_pct = 20 fat_pct = 18 fiber_pct = 4 Predicted value: 6.8000 Surface optimum (via L-BFGS-B, quadratic model): protein_pct = 20 fat_pct = 18 fiber_pct = 5.01754 Predicted value: 6.9844 Model quality: Good fit — general trends are captured, some noise remains. Factor importance: 1. fiber_pct (effect: 0.9, contribution: 40.6%) 2. fat_pct (effect: 0.8, contribution: 36.4%) 3. protein_pct (effect: 0.5, contribution: 23.0%)
← All Use Cases Next: Cat Litter Box Management →