Install
$ agentstack add skill-choxos-biostatagent-power-optimization-patterns ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Power Optimization Patterns
When to Use This Skill
- Optimizing sample size for target power
- Selecting design parameters (randomization ratio, event count)
- Trading off between competing objectives
- Performing sensitivity analysis
- Finding optimal regions across scenarios
Clinical Trial Optimization Framework
Problem Formulation
Components:
- Data Model D(θ): Parameterized by θ (treatment effects, rates, etc.)
- Analysis Model A(λ): Parameterized by λ (sample size, events, etc.)
- Criterion ψ(λ | θ): Power or other metric
Objective: Find λ* that optimizes ψ(λ | θ) subject to constraints.
Direct Optimization
Sample Size Determination
Objective: Find minimum n such that Power(n) ≥ target
Binary Search Algorithm:
find_sample_size 5) {
n_mid = target_power) {
n_high = 0.90))]
Tradeoff-Based Optimization
Additive Criterion
Formula:
ψ_combined(λ) = w₁ × ψ₁(λ) + w₂ × ψ₂(λ)
Example: Power vs Sample Size
# Weights: 70% power importance, 30% sample size (negative for minimization)
w1 = 0.90)
optimal_w = 80%):", mean(bootstrap_power >= 0.80), "\n")
Optimal Intervals and Regions
Optimal Interval
The η-optimal interval contains all λ values within η% of optimal power.
# Define optimal interval
eta = threshold]
cat("95%-optimal interval: [", min(optimal_interval), ",", max(optimal_interval), "]")
Joint Optimal Region
Intersection of optimal intervals across scenarios.
# Find joint optimal region
intervals subset(w1 + w2 == 1)
# Evaluate each weight combination
# ... and select optimal weights
Best Practices
- Define Clear Objective: Power, sample size, cost, or combination
- Consider All Scenarios: Use qualitative sensitivity for range
- Validate Constraints: Check FWER, minimum power thresholds
- Document Trade-offs: Explain rationale for chosen parameters
- Report Robustness: Show performance across scenarios
- Pre-specify Optimization: Define optimization strategy in SAP
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: choxos
- Source: choxos/BiostatAgent
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.