randomization
Implement proper randomization procedures for experiments. Use when: (1) Assigning participants to conditions, (2) Ensuring unbiased allocation, (3) Meeting CONSORT standards, (4) Pre-registration.
When & Why to Use This Skill
The Randomization skill automates the implementation of rigorous experimental designs by providing standardized participant allocation procedures. It helps researchers eliminate selection bias and ensure scientific integrity by supporting simple, block, and stratified randomization methods, directly facilitating compliance with CONSORT standards and formal pre-registration requirements.
Use Cases
- Clinical Trials: Assigning patients to treatment or control groups using stratified randomization to balance prognostic factors like age, gender, or disease severity.
- Behavioral Studies: Implementing block randomization to ensure equal group sizes across different experimental conditions, preventing imbalances in small sample sizes.
- Research Pre-registration: Generating reproducible random sequences with documented seeds to satisfy transparency requirements for journals and institutional review boards.
- Methodological Documentation: Automating the description of allocation concealment and sequence generation for the 'Methods' section of academic papers and CONSORT checklists.
| name | randomization |
|---|---|
| description | "Implement proper randomization procedures for experiments. Use when: (1) Assigning participants to conditions, (2) Ensuring unbiased allocation, (3) Meeting CONSORT standards, (4) Pre-registration." |
| allowed-tools | Read, Write, Bash |
| version | 1.0.0 |
Randomization Skill
Purpose
Implement proper random assignment to minimize selection bias.
Randomization Methods
1. Simple Randomization
- Coin flip, random number generator
- Best for large samples (N>200)
- Risk of imbalance in small samples
2. Block Randomization
- Ensures equal group sizes
- Blocks of 4, 6, or 8
- Example: AABB, ABAB, BABA, BBAA
3. Stratified Randomization
- Balance prognostic factors
- Stratify by sex, age group, severity
- Then randomize within strata
4. Minimization
- Dynamic allocation
- Minimizes imbalance across factors
- Used in small trials
Implementation
Steps:
- Generate random sequence (with seed)
- Document sequence generation
- Implement allocation concealment
- Execute randomization
- Document actual allocation
Example (Python):
import random
random.seed(12345) # Document seed
sequence = ['A', 'B'] * 50 # 100 participants
random.shuffle(sequence)
Version: 1.0.0