design-of-experiments
>- Generate full-factorial and two-level factorial DOE plans with randomization support and compute main-effect estimates. Use when planning a small experimental campaign with 2-5 factors and a clear single response. Don't use for response-surface methodology (RSM is outside the scope), Plackett-Bur
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- design-of-experiments
- risk
- low
- source
- https://github.com/jskherman/engg-skills
- license
- MIT
- version
- 1.0.0
- category
- chemical-engineering
- description
- >- Generate full-factorial and two-level factorial DOE plans with randomization support and compute main-effect estimates. Use when planning a small experimental campaign with 2-5 factors and a clear single response. Don't use for response-surface methodology (RSM is outside the scope), Plackett-Bur
- imported_at
- 2026-09-20
- source_path
- skills/design-of-experiments/SKILL.md
- source_repository
- jskherman/engg-skills
- disable-model-invocation
- false
02 资源文件 2
- 参考文档references/factorial_designs.md148 B
- 脚本scripts/doe.py2.1 KB
03 SKILL.md 正文
Design of Experiments
Overview
Factorial DOE helpers:
- Full factorial design enumeration for an arbitrary number of factors at arbitrary level counts.
- Two-level factorial design (2^k) with optional randomization.
- Main-effect estimates from a fitted run (simple averaging contrast).
Suitable for hands-on screening campaigns with a small number of factors; not a replacement for full RSM (central composite, Box-Behnken) or optimal-design software.
Prerequisites
uvavailable.
When to Use
- Planning a 2-5 factor screening campaign with clear inputs and a single response.
- Generating a randomised run sheet for a small experiment.
- Computing the rough magnitude of main effects after a small run.
Don't use for
- Response-surface methodology (RSM, central composite, Box-Behnken).
- Plackett-Burman or fractional-factorial confounding analysis.
- Observational data — DOE assumes you control the factor levels.
- Mixture experiments (constrained simplex designs).
Utility Scripts
uv run scripts/doe.py full-factorial --factor "T=300,320" --factor "P=1e5,2e5" --output /tmp/fact.jsonuv run scripts/doe.py two-level --factors "A,B,C" --randomize --seed 42 --output /tmp/2k.json
Procedure
- List factors and their levels (2 for screening, more for full factorial).
- Choose the design (full factorial for small k; two-level if you only want main effects and 2-factor interactions).
- Randomise the run order to mitigate time-order effects.
- Add replication externally if you need pure-error estimates or curvature checks.
- After the run, compute main effects.
- If main effects are statistically significant, iterate to RSM with a different tool.
Pitfalls
- Choosing two levels that are too close; main effects fall in the noise.
- Forgetting to randomise; time-order confounds the factor effects.
- Reporting effects without replicate variability.
- Confusing main effect (averaged over the other factors) with conditional slope (computed at fixed values of the other factors).
- Treating a two-level design as a curvature test; this script does not add centre points or run an RSM analysis.
- Using a 2^k design when you have only one shot per condition (no replicates) and treating ±SE as meaningful.
- Picking response that is correlated with multiple physical phenomena without thinking about what the design is testing.
- Forgetting blocking when the experiment spans multiple days / raw-material lots.
Fallback Strategies
- If the number of factors exceeds 5, switch to fractional-factorial or
Plackett-Burman screening (use
pyDOE2outside this skill). - For curvature exploration, switch to a central composite design with a dedicated package.
Verification
- Run the listed script with representative inputs and an
--outputfile when a deterministic calculation is available. - Confirm the JSON result contains
ok: true, expected units, and no unhandled warnings. - Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
References
references/factorial_designs.md— design conventions and analysis outline.- Montgomery, Design and Analysis of Experiments (any edition).
Anti-Patterns
- Reporting "the effect of T is X" without naming the level range and the other factors held fixed.
- Designing an experiment without randomization and reporting the estimates as if independent.
- Using 2-level factorial for a known curved response.
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.