linreg-core 0.8.1

Lightweight regression library (OLS, Ridge, Lasso, Elastic Net, WLS, LOESS, Polynomial) with 14 diagnostic tests, cross validation, and prediction intervals. Pure Rust - no external math dependencies. WASM, Python, FFI, and Excel XLL bindings.
Documentation
{
  "test": "ols",
  "method": "statsmodels",
  "dataset": "longley",
  "formula": "GNP.deflator ~ GNP + Unemployed + Armed Forces + Population + Year + Employed",
  "n": 16,
  "k": 6,
  "df_residual": 9,
  "variable_names": [
    "Intercept",
    "GNP",
    "Unemployed",
    "Armed Forces",
    "Population",
    "Year",
    "Employed"
  ],
  "coefficients": [
    2946.856360185193,
    0.26352724693255025,
    0.03648291369200263,
    0.011161050494472358,
    -1.7370298379331732,
    -1.4187985266985947,
    0.23128785076423242
  ],
  "std_errors": [
    5647.976576347599,
    0.1081510389737319,
    0.03024498173690025,
    0.015453486545799587,
    0.6738152600466468,
    2.9446024322694058,
    1.3039408598178244
  ],
  "t_stats": [
    0.5217543522623547,
    2.4366594110719237,
    1.2062468415212106,
    0.7222351060645303,
    -2.577902195051092,
    -0.48183025020635006,
    0.17737602823225126
  ],
  "p_values": [
    0.6144372336626782,
    0.037569937619587615,
    0.2584732858212005,
    0.48849004899201814,
    0.02979899028097343,
    0.6414268914236055,
    0.8631408328074965
  ],
  "r_squared": 0.9926473958221325,
  "adj_r_squared": 0.9877456597035541,
  "f_statistic": 202.50935011777526,
  "f_p_value": 4.425791244321605e-09,
  "mse": 1.4271113668658895,
  "std_error": 1.1946176655591065,
  "log_likelihood": -20.945322396866835,
  "aic": 55.89064479373367,
  "bic": 61.298765849412135,
  "conf_int_lower": [
    -9829.75430731601,
    0.01887259945405481,
    -0.03193598838282717,
    -0.023797164785313865,
    -3.2613058548504306,
    -8.079952010449848,
    -2.718431305137909
  ],
  "conf_int_upper": [
    15723.467027686396,
    0.5081818944110457,
    0.10490181576683243,
    0.04611926577425858,
    -0.2127538210159161,
    5.242354957052657,
    3.181007006666374
  ],
  "residuals": [
    -0.6008155754039848,
    1.550273215505328,
    0.10322872023738228,
    -1.2306486150899332,
    -0.3355139148636823,
    0.2693345070135109,
    0.8776758996827709,
    0.12224294321966056,
    -2.0086121316515175,
    -0.48598261423325084,
    1.0663129096678432,
    1.2274905792284585,
    -0.3835820706801911,
    0.2710215133125615,
    0.19785689651327232,
    -0.6402822641959176
  ],
  "vif": [
    {
      "variable": "GNP",
      "vif": 1214.5721487549663,
      "rsquared": 0.9991766648024779
    },
    {
      "variable": "Unemployed",
      "vif": 83.95864609014245,
      "rsquared": 0.9880893743935991
    },
    {
      "variable": "Armed Forces",
      "vif": 12.156386301098246,
      "rsquared": 0.9177387115519966
    },
    {
      "variable": "Population",
      "vif": 230.91221480979843,
      "rsquared": 0.995669349926665
    },
    {
      "variable": "Year",
      "vif": 2065.7339385300716,
      "rsquared": 0.9995159105529768
    },
    {
      "variable": "Employed",
      "vif": 220.4196816766494,
      "rsquared": 0.9954632000536732
    }
  ]
}