{
  "test_id": "linear_regression",
  "test_label": "Linear regression",
  "n": 60,
  "statistic": 7.4129660980602763,
  "parameter": 56,
  "p_value": 7.1882724693488228e-10,
  "estimate": 6.3140453167892545,
  "conf_int": [4.6077711328896882, 8.0203195006888208],
  "effect_size": {
    "name": "R2",
    "value": 0.78554998002408538
  },
  "seed_used": 20261025,
  "assumptions": [
    {
      "id": "normality",
      "check": "normality (Shapiro-Wilk)",
      "statistic": 0.97208113062091372,
      "p_value": 0.184298906414814,
      "passed": true,
      "note": "no evidence against normality"
    }
  ],
  "warnings": [],
  "flags": [
    {
      "severity": "note",
      "message": "5 of 60 observations used in this analysis have a Cook's distance above the conventional 4/n screening threshold (largest observed: 0.146); a small number of rows may be disproportionately driving the fit. Consider inspecting those rows for data-entry errors or genuine extreme cases before trusting the estimate.",
      "message_i18n": {
        "key": "sanity.high_influence",
        "args": {
          "flagged": "5",
          "n": "60",
          "threshold": "4/n",
          "largest": "0.146"
        }
      },
      "code": "high_influence_points",
      "citations": ["A small number of observations with disproportionately large Cook's distance can dominate a fit's estimated coefficients; the conventional 4/n screening threshold is a convenience rule, not a law (Cook, R.D., 1977, Detection of Influential Observation in Linear Regression, Technometrics, 19(1), 15-18; Bollen, K.A. & Jackman, R.W., 1990, Regression Diagnostics: An Expository Treatment of Outliers and Influential Cases, in Modern Methods of Data Analysis, Sage)."]
    },
    {
      "severity": "note",
      "message": "dose_x_supp: variance inflation factor (VIF) above 5, the screening value this check uses. VIF is how many times larger a coefficient's variance is than it would be if the predictor were unrelated to the others. A high VIF means these predictors overlap with the others in this model, which makes their estimates less precise and their confidence intervals wider. It is not by itself a reason to distrust the result or to drop a predictor: judge by whether the intervals are narrow enough for your purpose.",
      "message_i18n": {
        "key": "sanity.multicollinearity",
        "args": {
          "columns": "dose_x_supp",
          "threshold": "5"
        }
      },
      "code": "multicollinearity_vif",
      "citations": ["A variance inflation factor measures how much collinearity inflates the variance of a coefficient. Rules of thumb for it (4, 5 or 10) are conventions, and a high value is not by itself a reason to question a result or to drop a predictor (O'Brien, R.M., 2007, A Caution Regarding Rules of Thumb for Variance Inflation Factors, Quality & Quantity, 41, 673-690)."]
    }
  ],
  "test_label_i18n": {
    "key": "test.linear_regression.label"
  },
  "coefficients": [
    {
      "term": "(Intercept)",
      "estimate": 11.637813564151804,
      "std.error": 1.1267685197823616,
      "statistic": 10.32848660557155,
      "p.value": 1.39884891187831e-14,
      "conf.low": 9.3806249846078327,
      "conf.high": 13.895002143695775
    },
    {
      "term": "dose_mg",
      "estimate": 6.3140453167892545,
      "std.error": 0.85175693956585441,
      "statistic": 7.4129660980602763,
      "p.value": 7.1882724693488228e-10,
      "conf.low": 4.6077711328896882,
      "conf.high": 8.0203195006888208
    },
    {
      "term": "supp_vc",
      "estimate": -2.7606295897861308,
      "std.error": 1.5934913223312726,
      "statistic": -1.7324409308657789,
      "p.value": 0.088699887198549848,
      "conf.low": -5.952776291810876,
      "conf.high": 0.43151711223861433
    },
    {
      "term": "dose_x_supp",
      "estimate": 3.9197846105891787,
      "std.error": 1.2045662157794321,
      "statistic": 3.2541047218834915,
      "p.value": 0.0019312886756443545,
      "conf.low": 1.5067485185913281,
      "conf.high": 6.3328207025870293
    }
  ],
  "alpha": 0.050000000000000003,
  "sidedness": "two-sided",
  "estimate_label": "dose_mg",
  "imputation": {
    "strategy": "complete_case",
    "n_rows": 60,
    "n_dropped": 0,
    "n_cells_imputed": 0,
    "imputed_cols": []
  },
  "power": {
    "method": "linear regression (pwr)",
    "n": 60,
    "alpha": 0.050000000000000003,
    "target_power": 0.80000000000000004,
    "mdes": 0.19487996269467439,
    "mdes_metric": "Cohen's f2",
    "mdes_metric_i18n": {
      "key": "power.metric.cohens_f2"
    },
    "required_n": 77,
    "required_n_label": "77 total to detect f2=0.15",
    "required_n_label_i18n": {
      "key": "power.required_n.linear_regression",
      "args": {
        "n": "77",
        "effect": "0.15"
      }
    },
    "severely_underpowered": false,
    "note": null,
    "call_code": "pwr::pwr.f2.test(u = 3, v = 56, sig.level = 0.05, power = 0.8)"
  },
  "explanations": ["Each 1-unit increase in dose_mg is associated with a 6.314-unit increase in tooth_length (p < 0.001).", "Each 1-unit increase in supp_vc is associated with a 2.761-unit decrease in tooth_length (p = 0.0887).", "Each 1-unit increase in dose_x_supp is associated with a 3.92-unit increase in tooth_length (p = 0.00193).", "Together the predictors explain ~78.55% of the variation in tooth_length (R-squared 0.7855).", "This result is statistically significant at the 0.05 level (p < 0.001, n = 60)."],
  "explanations_i18n": [
    {
      "key": "exp.lm.numeric_increase",
      "args": {
        "term": "dose_mg",
        "difference": "6.314",
        "outcome": "tooth_length",
        "p": "p < 0.001"
      }
    },
    {
      "key": "exp.lm.numeric_decrease",
      "args": {
        "term": "supp_vc",
        "difference": "2.761",
        "outcome": "tooth_length",
        "p": "p = 0.0887"
      }
    },
    {
      "key": "exp.lm.numeric_increase",
      "args": {
        "term": "dose_x_supp",
        "difference": "3.92",
        "outcome": "tooth_length",
        "p": "p = 0.00193"
      }
    },
    {
      "key": "exp.lm.r_squared",
      "args": {
        "percent": "78.55",
        "outcome": "tooth_length",
        "r_squared": "0.7855"
      }
    },
    {
      "key": "exp.closer.significant",
      "args": {
        "alpha": "0.05",
        "p": "p < 0.001",
        "n": "60"
      }
    }
  ]
}
