AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Power Optimization Patterns

skill-choxos-biostatagent-power-optimization-patterns · by choxos

Direct and tradeoff-based optimization strategies for clinical trial design. Use when optimizing sample size, selecting design parameters, or performing sensitivity analysis.

— No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-choxos-biostatagent-power-optimization-patterns

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-choxos-biostatagent-power-optimization-patterns)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
○ 4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Power Optimization Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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

  1. Define Clear Objective: Power, sample size, cost, or combination
  2. Consider All Scenarios: Use qualitative sensitivity for range
  3. Validate Constraints: Check FWER, minimum power thresholds
  4. Document Trade-offs: Explain rationale for chosen parameters
  5. Report Robustness: Show performance across scenarios
  6. 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.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.