experimental-design

Generates randomized allocation schedules and DOE matrices for planning experiments before data collection.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/CliffVale/opencode-free-setup --skill experimental-design-cliffvale
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: experimental-design
Source: https://github.com/CliffVale/opencode-free-setup/tree/main/skills/experimental-design
Command: npx skills add https://github.com/CliffVale/opencode-free-setup --skill experimental-design-cliffvale

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill requires numpy, pandas, pyDOE3, and includes scripts (resource) and references (resource) components.

What problem does it solve? Poorly designed studies β€” confounded assignments, pseudoreplication, missing controls β€” produce data that no analysis can rescue. This Skill helps you choose the right experimental design, generate reproducible randomization schedules and DOE matrices, and avoid structural mistakes before any data is collected. ## Core Features & Use Cases - Randomization schedules: Generate seeded simple, permuted-block, stratified-block, and cluster randomization tables as pandas DataFrames, with arm-balance checks. - DOE matrices: Build full and fractional factorial, Plackett-Burman screening, central composite, Box-Behnken, and Latin hypercube designs in real factor units with randomized run order, powered by pyDOE3. - Design guidance: Decision trees and reference docs covering blocking, stratification, controls, blinding, crossover/split-plot/cluster designs, aliasing and resolution, and sequential/adaptive trials. - Use Case: You need to test 7 factors cheaply to find the few that matter β€” generate a Plackett-Burman screening design in real units with randomized run order, then follow up with a response-surface design to optimize. ## Quick Start Ask the assistant to design an experiment that randomly assigns 60 subjects to treatment and control arms in balanced blocks and save the allocation schedule to a CSV file.

Frequently Asked Questions about experimental-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I randomize subjects to treatment and control groups in Python?β–Ό

Use the randomization script's block_randomization function with a seed to generate a permuted-block allocation schedule as a pandas DataFrame. For balancing a prognostic variable like site or sex, use stratified_block_randomization, which block-randomizes independently within each stratum.

What is the difference between full factorial and fractional factorial designs?β–Ό

A full 2^k factorial estimates all main effects and interactions but needs 2^k runs, practical only up to about 5 factors. A fractional factorial runs a chosen fraction of those runs, trading some interaction estimates for efficiency, with the tradeoff summarized by the design's resolution and alias structure.

When should I use a Plackett-Burman screening design?β–Ό

Use Plackett-Burman when screening many factors (5 to 20 or more) to find the vital few, since it needs only the next multiple of 4 above k runs. It estimates main effects only and heavily confounds two-factor interactions, so follow up with a higher-resolution design.

What is pseudoreplication and how do I avoid it?β–Ό

Pseudoreplication is treating repeated measurements of one unit as independent replicates, such as counting 100 cells from one mouse as n=100. Replicate at the level the treatment is randomized to, and analyze with a mixed model that respects the nesting structure.

Does this skill compute sample size or statistical power?β–Ό

No, sample size and power calculations are handled by the separate statistical-power skill once the design is chosen. This skill covers design selection, randomization, blocking, and generating the experimental layout before data collection.

What Python packages are required to run the design scripts?β–Ό

The scripts require numpy, pandas, and pyDOE3, installed into the shared office-skills virtual environment with uv. pyDOE3 supplies the factorial, Plackett-Burman, central composite, Box-Behnken, and Latin hypercube generators.