Analyze a cohort
analyze_cohortCompute case-cohort statistics—counts, fiscal-year trends, medians, disposition and judgment rates—from a find_cases handle, optionally grouped by court, year, NOS group, or origin.
Instructions
Use this after find_cases, to compute a statistic for its cohort handle: count, trend (by fiscal year), median_days_to_disposition, disposition_rates (dismissed / judgment / transferred), judgment_for_rates, share_by_nos_group, pro_se_share or still_pending_share, optionally grouped by court, fiscal_year, nos_group or origin.
Not for published statistics (get_official_figure) or whole-court changes (explain_change); it needs a handle from find_cases.
Returns one value per group with n (cases it's computed over) and a 95% confidence interval (Wilson for shares, order statistics for medians). Groups under 30 cases carry a caution; under 10 the value and n are withheld (null, status 'suppressed'), as is the next smallest group where needed: say there are too few cases rather than guessing. Report n with every figure.
Example: handle from find_cases(courts=['DE'], fy_from=2019, fy_to=2019, nos_codes=['830']), metric='median_days_to_disposition' → 166 days (95% CI 154–183), n=845.
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": {
"handle": "<handle>",
"metric": "<metric>"
},
"name": "analyze_cohort"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | Yes | From find_cases. | |
| metric | Yes | ||
| group_by | No | Optional grouping (≤ 25 groups). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| status | No | ok | |
| declined | No | ||
| warnings | No | ||
| provenance | No | ||
| clarification | No | ||
| suggested_next | No | Hints for a follow-up call. |