{
  "test_id": "cox_ph",
  "test_label": "Cox proportional-hazards regression",
  "n": 137,
  "statistic": 1.0216448148871784,
  "parameter": "NA",
  "p_value": 0.30694903877254803,
  "estimate": 1.2087012570971276,
  "conf_int": [0.84022381219127396, 1.7387732979121933],
  "effect_size": {
    "name": "hazard_ratio",
    "value": 1.2087012570971276,
    "ci": [0.84022381219127396, 1.7387732979121933],
    "ci_level": 0.94999999999999996
  },
  "seed_used": 20261028,
  "assumptions": [
    {
      "id": "proportional_hazards",
      "check": "proportional hazards (cox.zph)",
      "statistic": "NA",
      "p_value": 0.00026047944945819802,
      "passed": false,
      "note": "evidence the proportional-hazards assumption is violated"
    },
    {
      "id": "events_per_variable",
      "check": "events per variable",
      "statistic": 42.666666666666664,
      "p_value": "NA",
      "passed": true,
      "note": "at or above the rule-of-thumb floor (a convention, not a guarantee of a stable model)"
    }
  ],
  "warnings": [],
  "flags": [
    {
      "severity": "warning",
      "message": "The proportional-hazards assumption may be violated (Schoenfeld residual test p<0.05); consider stratification or a time-varying covariate.",
      "message_i18n": {
        "key": "flag.proportional_hazards"
      }
    },
    {
      "severity": "note",
      "message": "Values beyond Tukey's 1.5xIQR fence in: 'time' (12). Descriptive only - nothing has been removed or changed; check whether these reflect genuine extreme cases or data-entry errors.",
      "message_i18n": {
        "key": "sanity.outlier_values",
        "args": {
          "columns": "'time' (12)"
        }
      },
      "code": "outlier_values",
      "citations": ["Tukey's 1.5xIQR fence is a descriptive convention for flagging unusually extreme values, not a definition of error or a license to remove data - some 'outliers' are genuine biological extremes (Tukey, J.W., 1977, Exploratory Data Analysis, Addison-Wesley)."]
    }
  ],
  "test_label_i18n": {
    "key": "test.cox_ph.label"
  },
  "coefficients": [
    {
      "term": "trt",
      "estimate": 1.2087012570971276,
      "std.error": 0.1855306650230592,
      "statistic": 1.0216448148871784,
      "p.value": 0.30694903877254803,
      "conf.low": 0.84022381219127396,
      "conf.high": 1.7387732979121933
    },
    {
      "term": "karno",
      "estimate": 0.9661425418168369,
      "std.error": 0.0052324149005547682,
      "statistic": -6.5827915968776054,
      "p.value": 4.6169609792315733e-11,
      "conf.low": 0.95628504935196357,
      "conf.high": 0.97610164640851371
    },
    {
      "term": "age",
      "estimate": 0.99614303937970361,
      "std.error": 0.0091873846581506605,
      "statistic": -0.42062219203440326,
      "p.value": 0.67403098605855916,
      "conf.low": 0.97836608307322825,
      "conf.high": 1.0142430037922343
    }
  ],
  "alpha": 0.050000000000000003,
  "sidedness": "two-sided",
  "estimate_label": "trt",
  "imputation": {
    "strategy": "complete_case",
    "n_rows": 137,
    "n_dropped": 0,
    "n_cells_imputed": 0,
    "imputed_cols": []
  },
  "time_unit": "days",
  "n_events": 128,
  "conf_level": 0.94999999999999996,
  "term_tests": [
    {
      "term": "trt",
      "test_method": "LR",
      "statistic": 1.041905218067086,
      "df": 1,
      "p_value": 0.30737878224243087
    },
    {
      "term": "karno",
      "test_method": "LR",
      "statistic": 42.516335626442697,
      "df": 1,
      "p_value": 7.0094355226178787e-11
    },
    {
      "term": "age",
      "test_method": "LR",
      "statistic": 0.17542814456021461,
      "df": 1,
      "p_value": 0.67533202327140796
    }
  ],
  "model_test": {
    "test_method": "LR",
    "statistic": 43.14214976045605,
    "df": 3,
    "p_value": 2.2957787273910521e-09,
    "wald": {
      "statistic": 44.520000000000003,
      "df": 3,
      "p_value": 1.1691834732907476e-09
    },
    "score": {
      "statistic": 46.835878034128797,
      "df": 3,
      "p_value": 3.7665189891302033e-10
    }
  },
  "ph_tests": [
    {
      "term": "trt",
      "chisq": 0.28354692646963342,
      "df": 1,
      "p_value": 0.59438580362174664
    },
    {
      "term": "karno",
      "chisq": 12.002957449757549,
      "df": 1,
      "p_value": 0.00053116193321729288
    },
    {
      "term": "age",
      "chisq": 2.099517624512885,
      "df": 1,
      "p_value": 0.14734561729991008
    },
    {
      "term": "GLOBAL",
      "chisq": 19.10166478625365,
      "df": 3,
      "p_value": 0.00026047944945819802
    }
  ],
  "power": {
    "method": null,
    "n": "NA",
    "mdes": "NA",
    "mdes_metric": null,
    "mdes_metric_i18n": null,
    "required_n": "NA",
    "required_n_label": null,
    "required_n_label_i18n": null,
    "severely_underpowered": null,
    "note": "Power is not calculated for this test.",
    "call_code": null
  },
  "explanations": ["Each additional unit of trt is associated with a 20.87% higher hazard - higher risk (HR 1.209, 95% CI 0.8402 to 1.739; p = 0.307).", "Each additional unit of karno is associated with a 3.386% lower hazard - lower risk (HR 0.9661, 95% CI 0.9563 to 0.9761; p < 0.001).", "Each additional unit of age is associated with a 0.3857% lower hazard - lower risk (HR 0.9961, 95% CI 0.9784 to 1.014; p = 0.674).", "The proportional-hazards check is below 0.05 for karno: that hazard ratio may change over follow-up, so read it as a weighted average of the changing hazard ratios over this study's follow-up period, not as a constant effect.", "This result is not statistically significant at the 0.05 level (p = 0.307, n = 137)."],
  "explanations_i18n": [
    {
      "key": "exp.cox.numeric_pct_higher",
      "args": {
        "term": "trt",
        "percent": "20.87",
        "ratio": "1.209",
        "extras": {
          "key": "exp.extras.ci_p",
          "args": {
            "ci": {
              "key": "exp.ci",
              "args": {
                "level": "95",
                "lower": "0.8402",
                "upper": "1.739"
              }
            },
            "p": "p = 0.307"
          }
        }
      }
    },
    {
      "key": "exp.cox.numeric_pct_lower",
      "args": {
        "term": "karno",
        "percent": "3.386",
        "ratio": "0.9661",
        "extras": {
          "key": "exp.extras.ci_p",
          "args": {
            "ci": {
              "key": "exp.ci",
              "args": {
                "level": "95",
                "lower": "0.9563",
                "upper": "0.9761"
              }
            },
            "p": "p < 0.001"
          }
        }
      }
    },
    {
      "key": "exp.cox.numeric_pct_lower",
      "args": {
        "term": "age",
        "percent": "0.3857",
        "ratio": "0.9961",
        "extras": {
          "key": "exp.extras.ci_p",
          "args": {
            "ci": {
              "key": "exp.ci",
              "args": {
                "level": "95",
                "lower": "0.9784",
                "upper": "1.014"
              }
            },
            "p": "p = 0.674"
          }
        }
      }
    },
    {
      "key": "exp.cox.ph_terms",
      "args": {
        "alpha": "0.05",
        "variables": "karno"
      }
    },
    {
      "key": "exp.closer.not_significant",
      "args": {
        "alpha": "0.05",
        "p": "p = 0.307",
        "n": "137"
      }
    }
  ]
}
