omni_hazard_ratio_relative_risk
Calculate relative risk, absolute risk reduction, number needed to treat, and odds ratio from trial event and sample counts for clinical evidence analysis.
Instructions
Hazard Ratio (HR), Relative Risk (RR) & Odds Ratio (OR) Calculator. Calculate clinical evidence metrics including Relative Risk (RR), Relative Risk Reduction (RRR), Absolute Risk Reduction (ARR), and Number Needed to Treat (NNT). Discipline: BIOTECH. Governing mathematical model / formula: RR = (a / n₁) / (c / n₂) | ARR = CER - EER | NNT = 1 / ARR.
USAGE GUIDELINES:
WHEN TO USE: Invoke for deterministic calculation of relative_risk_ratio_rr (Relative Risk (RR)), absolute_risk_reduction_arr (Absolute Risk Reduction (ARR)), number_needed_to_treat_nnt (Number Needed to Treat (NNT)), odds_ratio_or (Odds Ratio (OR)) using experimental_event_count_a (Experimental Group Events (a) in events), experimental_total_count_n1 (Experimental Group Total Sample (n₁) in patients), control_event_count_c (Control / Placebo Events (c) in events), control_total_count_n2 (Control Group Total Sample (n₂) in patients). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.
WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.
DISAMBIGUATION & BOUNDARIES:
Use this dedicated specialist tool for 'Hazard Ratio (HR), Relative Risk (RR) & Odds Ratio (OR) Calculator' rather than generic dispatchers like omni_universal_query.
For multi-calculation chained jobs, use 'omni_batch_calculate'.
To inspect schema fields, see 'omni_describe_solver'.
BEHAVIOR & SAFETY:
Pure deterministic computation with machine floating-point precision.
Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.
Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.
RETURNS:
Structured JSON object containing:
status (string): "success" on valid execution or "error" if validation fails
calculator (string): "hazard-ratio-relative-risk"
category (string): "biotech"
name (string): "Hazard Ratio (HR), Relative Risk (RR) & Odds Ratio (OR) Calculator"
formula (string): Governing mathematical formula string
inputs (object): Echoed input parameter dictionary with applied defaults
metrics (object): Dictionary of computed outputs:
metrics.relative_risk_ratio_rr (Relative Risk (RR)): Formatted display string (e.g. '0.50 (50% Risk Reduction)')
metrics.absolute_risk_reduction_arr (Absolute Risk Reduction (ARR)): Formatted display string (e.g. '7.00% Absolute Gain')
metrics.number_needed_to_treat_nnt (Number Needed to Treat (NNT)): Formatted display string (e.g. '15 Patients to Prevent 1 Event')
metrics.odds_ratio_or (Odds Ratio (OR)): Formatted display string (e.g. '0.46 (Protective Effect)')
execution_time_ms (number): Latency in milliseconds.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "omni_hazard_ratio_relative_risk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| control_event_count_c | No | Control / Placebo Events (c) (events). Patients experiencing primary outcome in placebo arm. Default: 70. Min: 0. Max: 10000. | |
| control_total_count_n2 | No | Control Group Total Sample (n₂) (patients). Total patients in control placebo arm. Default: 500. Min: 10. Max: 100000. | |
| experimental_event_count_a | No | Experimental Group Events (a) (events). Patients experiencing primary outcome in treatment arm. Default: 35. Min: 0. Max: 10000. | |
| experimental_total_count_n1 | No | Experimental Group Total Sample (n₁) (patients). Total patients in experimental treatment arm. Default: 500. Min: 10. Max: 100000. |