time-to-event-methods

time-to-event-methods is a skill for Claude Code from choxos/BiostatAgent. It costs 42 tokens per session (2,045 once invoked), scanned A, original, MIT.

A guide to analysing time-to-event data, such as how long patients remain alive or free from an event, when treatment effects change over time.

In plain words
What is it for?
Use it to select weighted logrank, MaxCombo, restricted mean survival time, or milestone tests for survival endpoints and implement the chosen approach with simtrial.
Why use it?
It helps choose an analysis method when the usual assumption of a constant treatment effect does not hold, including effects that appear early or late.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clinical-trial-simulation plugin — 7 skills, 5 commands, 7 agents shipped together

Good fit Use it to select weighted logrank, MaxCombo, restricted mean survival time, or milestone tests for survival endpoints and implement the chosen approach with simtrial.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/choxos/biostatagent/time-to-event-methods
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add choxos/BiostatAgent --skill time-to-event-methods
Clone the repo
git clone --depth 1 https://github.com/choxos/BiostatAgent

Made for: Claude Code.

Or install clinical-trial-simulation, the plugin that ships this one along with the rest of its 7 skills, 5 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for time-to-event-methods

README.md
[![agentmods](https://agentmods.dev/badge/skills/choxos/biostatagent/time-to-event-methods/github.svg)](https://agentmods.dev/skills/choxos/biostatagent/time-to-event-methods)
Your own site
<a href="https://agentmods.dev/skills/choxos/biostatagent/time-to-event-methods"><img src="https://agentmods.dev/badge/skills/choxos/biostatagent/time-to-event-methods/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for time-to-event-methods

Your own site · 80×15
<a href="https://agentmods.dev/skills/choxos/biostatagent/time-to-event-methods"><img src="https://agentmods.dev/badge/skills/choxos/biostatagent/time-to-event-methods.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,045 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02045
Opus 5 $0.00021 $0.01022
Sonnet 5 $0.00008 $0.00409
Haiku 4.5 $0.00004 $0.00204

Measured 9d ago against content hash 0e59f5218a9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

time-to-event-methods scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/clinical-trial-simulation/skills/time-to-event-methods/SKILL.md · 305 lines

How it starts

The opening of the file, as written. The whole thing — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Time-to-Event Methods

When to Use This Skill

  • Selecting appropriate analysis methods for survival endpoints
  • Handling non-proportional hazards scenarios
  • Implementing weighted logrank tests
  • Designing MaxCombo tests
  • Using RMST or milestone endpoints

Analysis Methods Overview

Standard Logrank Test

When Optimal:

  • Proportional hazards assumption holds
  • Treatment effect constant over time

Formula:

Z = Σ(O_trt - E_trt) / √(Var)

simtrial Implementation:

data |> wlr(weight = fh(rho = 0, gamma = 0))

Fleming-Harrington Weighted Logrank

Weight Function:

w(t) = S(t)^ρ × (1 - S(t))^γ

Parameter Effects:

ρ γ Emphasis Best For
0 0 Uniform (standard LR) Proportional hazards
0 0.5 Moderate late Moderate delayed effect
0 1 Strong late Strong delayed effect
1 0 Early Early divergence
0.5 0.5 Balanced Crossing hazards

simtrial Implementation:

# Late emphasis
data |> wlr(weight = fh(rho = 0, gamma = 0.5))

# Early emphasis
data |> wlr(weight = fh(rho = 1, gamma = 0))

Magirr-Burman (MB) Weights

Design: Zero weight before delay, then increasing weight.

Parameters:

  • delay: Time before weights increase
  • w_max: Maximum weight cap

Formula:

w(t) = min(w_max, S(min(t, τ*))^(-1))

When to Use:

  • Known delay in treatment effect
  • Clear scientific rationale for delay period

simtrial Implementation:

# 4-month delay, max weight 2
data |> wlr(weight = mb(delay = 4, w_max = 2))

# Unlimited weight growth
data |> wlr(weight = mb(delay = 6, w_max = Inf))

Early Zero Weights (Xu et al., 2017)

Design: Exactly zero weight for early period, then standard logrank.

When to Use:

  • Want to completely ignore early period
  • Regulatory acceptance of early exclusion

simtrial Implementation:

# Zero weight for first 6 months
data |> wlr(weight = early_zero(early_period = 6))

Read the full file on GitHub · 305 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 305 lines · 42 tokens per session scan A 0e59f5218a9a

Subscribe to this mod's changes

time-to-event-methods is a skill published in the GitHub repository choxos/BiostatAgent (11 stars, last pushed 3mo ago), licensed MIT. It adds 42 tokens to every session and 2,045 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

imaging-data-commons

Query and download public cancer imaging data from NCI Imaging Data Commons. Invoke for any question about IDC collections, cancer imaging datasets, DICOM data access, radiology (CT, MR, PET) or pathology AI training sets, metadata queries, visualization, or license checks — even when the user doesn't explicitly…

K-Dense-AI/scientific-agent-skills · 75 tokens

lab-hardware-cad

Design custom laboratory hardware as parametric build123d models and export fabrication-ready STEP, STL, and DXF files - microfluidic chips and molds, optomechanical mounts and breadboard adapters, cuvette and microplate holders, tube racks, animal-behavior rigs, and 3D-printed instrument fixtures. Use when a research…

K-Dense-AI/scientific-agent-skills · 106 tokens

pkpd-modeling

Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK/PD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when…

K-Dense-AI/scientific-agent-skills · 273 tokens

diffdock

DiffDock and DiffDock-L molecular docking. Use for protein-small-molecule pose prediction from PDB or sequence plus SMILES/SDF/MOL2, batch docking, virtual screening, and pose-confidence interpretation. Not for binding affinity prediction.

K-Dense-AI/scientific-agent-skills · 51 tokens

latex-posters

Create professional research posters in LaTeX using beamerposter, tikzposter, or baposter. Support for conference presentations, academic posters, and scientific communication. Includes layout design, color schemes, multi-column formats, figure integration, and poster-specific best practices for visual communication.

K-Dense-AI/scientific-agent-skills · 60 tokens

neuropixels-analysis

Analyze Neuropixels extracellular recordings end-to-end with SpikeInterface. Covers loading SpikeGLX/Open Ephys/NWB data, preprocessing, drift/motion correction, Kilosort4 (and CPU) spike sorting, quality metrics, and unit curation (threshold-based, model-based UnitRefine, and AI-assisted visual review). Use when…

K-Dense-AI/scientific-agent-skills · 98 tokens