{
  "test_id": "kaplan_meier",
  "test_label": "Kaplan-Meier (log-rank test)",
  "n": 228,
  "statistic": 10.326741954885632,
  "parameter": 1,
  "p_value": 0.0013111645203554882,
  "estimate": "NA",
  "conf_int": null,
  "effect_size": {
    "name": "hazard_ratio",
    "value": 0.5880028185635886,
    "ci": [0.42371783035391491, 0.81598481317138638],
    "ci_level": 0.94999999999999996,
    "reference_level": "1",
    "comparison_level": "2"
  },
  "seed_used": 20261028,
  "assumptions": [
    {
      "id": "sample_size",
      "check": "sample size",
      "statistic": 228,
      "p_value": "NA",
      "passed": true,
      "note": "adequate n"
    },
    {
      "id": "number_of_events",
      "check": "number of events",
      "statistic": 165,
      "p_value": "NA",
      "passed": true,
      "note": "adequate events"
    },
    {
      "id": "proportional_hazards",
      "check": "proportional hazards (cox.zph)",
      "statistic": "NA",
      "p_value": 0.090625064252995574,
      "passed": true,
      "note": "no evidence against proportional hazards"
    }
  ],
  "warnings": [],
  "flags": [
    {
      "severity": "note",
      "message": "Event indicator 'status' read as 0/1: '2' = 1 (event), '1' = 0 (censored). To flip which level counts as the event, recode 'status' in Prepare data.",
      "message_i18n": {
        "key": "analysis.coercion.event_indicator",
        "args": {
          "column": "status",
          "event": "2",
          "reference": "1"
        }
      }
    },
    {
      "severity": "note",
      "message": "Values beyond Tukey's 1.5xIQR fence in: 'time' (10). 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' (10)"
        }
      },
      "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.kaplan_meier.label"
  },
  "alpha": 0.050000000000000003,
  "sidedness": "non-directional",
  "imputation": {
    "strategy": "complete_case",
    "n_rows": 228,
    "n_dropped": 0,
    "n_cells_imputed": 0,
    "imputed_cols": []
  },
  "group_medians": {
    "sex=1": 270,
    "sex=2": 426
  },
  "time_unit": "days",
  "n_events": 165,
  "conf_level": 0.94999999999999996,
  "median_ci_level": 0.94999999999999996,
  "group_median_ci": {
    "sex=1": [212, 310],
    "sex=2": [348, 550]
  },
  "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": ["The median survival time is when half of a group has had the event: 1 reached it at 270 days (95% CI 212 to 310); 2 reached it at 426 days (95% CI 348 to 550) (165 events among 228 participants).", "2 had 0.588x the hazard of 1 (HR 0.588, 95% CI 0.4237 to 0.816) - a value above 1 means higher risk (the event tended to come sooner), below 1 means lower risk.", "This result is statistically significant at the 0.05 level (p = 0.00131, n = 228)."],
  "explanations_i18n": [
    {
      "key": "exp.km.medians_events",
      "args": {
        "medians": {
          "key": "exp.list_join",
          "args": {
            "first": {
              "key": "exp.km.median_reached_ci",
              "args": {
                "group": "1",
                "median": "270",
                "unit": "days",
                "ci": {
                  "key": "exp.ci",
                  "args": {
                    "level": "95",
                    "lower": "212",
                    "upper": "310"
                  }
                }
              }
            },
            "rest": {
              "key": "exp.km.median_reached_ci",
              "args": {
                "group": "2",
                "median": "426",
                "unit": "days",
                "ci": {
                  "key": "exp.ci",
                  "args": {
                    "level": "95",
                    "lower": "348",
                    "upper": "550"
                  }
                }
              }
            }
          }
        },
        "events": "165",
        "n": "228"
      }
    },
    {
      "key": "exp.km.hazard_ratio_groups_ci",
      "args": {
        "group2": "2",
        "hazard_ratio": "0.588",
        "group1": "1",
        "extras": {
          "key": "exp.extras.ci",
          "args": {
            "ci": {
              "key": "exp.ci",
              "args": {
                "level": "95",
                "lower": "0.4237",
                "upper": "0.816"
              }
            }
          }
        }
      }
    },
    {
      "key": "exp.closer.significant",
      "args": {
        "alpha": "0.05",
        "p": "p = 0.00131",
        "n": "228"
      }
    }
  ]
}
