Estimate shelf life (ICH Q1E)
stab_estimate_shelf_lifeEstimate shelf life or retest period from long-term stability data by testing batch poolability, applying 95% confidence bounds, and capping results with Q1E extrapolation rules.
Instructions
Shelf life / retest period from long-term stability data, the Q1E way.
Tests batch poolability (ANCOVA: slopes, then intercepts, alpha 0.25), picks the most reduced model, finds the earliest time the 95% confidence bound for the mean meets the acceptance criterion (one-sided for a known direction, two-sided for 'both'), takes the shortest batch, and caps the result with the Q1E extrapolation rules when storage and accelerated results are given. Flags curvature, outliers, few batches/time points.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"attribute": "<attribute>"
},
"name": "stab_estimate_shelf_life"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| points | No | Long-term results, one per row. | |
| storage | No | Intended storage; with accelerated_significant_change, applies Q1E extrapolation limits. | |
| csv_text | No | Alternative to points: CSV with header batch,time_months,value. | |
| attribute | Yes | ||
| return_curve | No | Return fitted line and 95% bound per month, for plotting. | |
| pooling_alpha | No | Poolability significance level (Q1E: 0.25). | |
| proposed_shelf_life_months | No | Checked against what the data support. | |
| accelerated_significant_change | No | Q1A(R2) 'significant change' at the accelerated condition. | |
| intermediate_significant_change | No | Needed at room temperature when accelerated showed significant change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curve | No | ||
| batches | Yes | ||
| summary | Yes | One or two sentence plain-language answer. | |
| findings | No | ||
| n_points | Yes | ||
| attribute | Yes | ||
| citations | Yes | ||
| n_batches | Yes | ||
| confidence | Yes | ||
| disclaimer | No | Decision support only. Verify against the current guideline and your site SOPs. | |
| provenance | Yes | ||
| assumptions | No | ||
| poolability | Yes | ||
| residual_df | Yes | ||
| residual_sd | Yes | ||
| extrapolation | No | ||
| long_term_months | Yes | X: longest time point in the long-term data. | |
| proposed_supported | No | ||
| proposed_shelf_life_months | No | ||
| supported_shelf_life_months | Yes | Whole months supported: statistics capped by extrapolation rules where assessed. | |
| statistical_shelf_life_months | Yes | Shortest batch crossing (unrounded). |