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

Group Sequential Methods

skill-choxos-biostatagent-group-sequential-methods · by choxos

Group sequential design methods for interim analyses, alpha spending, and futility stopping. Use when designing trials with interim looks or implementing spending functions.

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

Install

$ agentstack add skill-choxos-biostatagent-group-sequential-methods

✓ 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-group-sequential-methods)

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 Group Sequential Methods? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Group Sequential Methods

When to Use This Skill

  • Designing group sequential trials with interim analyses
  • Implementing alpha spending functions
  • Setting futility stopping rules
  • Calculating information fractions
  • Using simgsn() for GS simulations
  • Integrating with gsDesign2 package

Fundamental Concepts

Group Sequential Design

A group sequential design allows for:

  • Early stopping for efficacy: If treatment effect is larger than expected
  • Early stopping for futility: If treatment effect is unlikely to reach significance
  • Reduced expected sample size: When treatment effect is present

Information Fraction

Information fraction at analysis k:

I_k / I_K = (events at analysis k) / (total planned events)

For time-to-event trials, information ≈ number of events.

Type I Error Spending

The key constraint is that the design controls the overall Type I error at the planned alpha level. Spending functions define cumulative alpha spending over information time, and boundaries are derived using the joint distribution of sequential test statistics. They are not obtained by simply assigning independent nominal alpha levels to each look.

Alpha Spending Functions

O'Brien-Fleming (OBF)

Properties:

  • Conservative at early analyses
  • Nearly full alpha at final analysis
  • Difficult to stop early
  • Maintains nominal Type I error

Formula:

α*(t) = 2 - 2Φ(z_{α/2} / √t)

When to Use:

  • Want maximum power at final analysis
  • Early efficacy stopping unlikely
  • Regulatory preference for conservative early bounds

Pocock

Properties:

  • Equal spending at each analysis
  • Easier to stop early
  • Inflated final alpha
  • Lower power at final analysis

Formula:

α*(t) = α × log(1 + (e-1)t)

When to Use:

  • Early stopping is a priority
  • Treatment effect expected to be large
  • Willing to sacrifice final analysis power

Hwang-Shih-DeCani (HSD)

Properties:

  • Flexible family indexed by γ
  • γ = -4: Similar to OBF
  • γ = 1: Similar to Pocock
  • γ = 0: Linear (Pocock-like)

Formula:

α*(t) = α × (1 - e^{-γt}) / (1 - e^{-γ})

When to Use:

  • Want flexibility between OBF and Pocock
  • Customized spending pattern needed

Spending Function Comparison

| Function | Early Spending | Final Power | Early Stopping | |----------|---------------|-------------|----------------| | OBF | Low | High | Difficult | | Pocock | High | Lower | Easier | | HSD(γ=-4) | Low | High | Difficult | | HSD(γ=1) | High | Lower | Easier |

Futility Boundaries

Binding Futility

  • If futility boundary crossed, trial MUST stop
  • Affects Type I error calculation
  • More powerful than non-binding

Non-Binding Futility

  • Crossing futility boundary is advisory
  • Trial can continue at investigator discretion
  • Conservative: assumes no early stopping for futility in Type I error

Beta-Spending for Futility

Similar to alpha-spending, but for Type II error:

β*(t) = spending function × β

simtrial GS Implementation

create_cut() - Define Analysis Timing

# Interim Analysis 1
ia1_cut  to_integer()

# Simulate with design object
sim_results 
  group_by(analysis) |>
  summarise(
    mean_events = mean(event),
    mean_z = mean(z),
    power = mean(z < qnorm(0.025)),  # One-sided
    .groups = "drop"
  )

Best Practices

  1. Information Fraction: Target evenly spaced (e.g., 50%, 100% or 33%, 67%, 100%)
  2. Alpha Spending: OBF is default for most regulatory submissions
  3. Futility: Use non-binding to preserve flexibility
  4. Validation: Compare simulated power to gsDesign analytical results
  5. Documentation: Record all boundary calculations for regulatory submission
  6. Parallelization: Use plan("multisession") for large simulations

Regulatory Considerations

  • Pre-specify number and timing of interim analyses
  • Pre-specify spending function and parameters
  • Document stopping rules clearly in protocol
  • Consider DSMB recommendations for unblinded reviews
  • Maintain blinding for operational team

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.