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": "synthetic_interaction",
  "formula": "x1 ~ x2 + y",
  "n": 100,
  "k": 2,
  "df_residual": 97,
  "variable_names": [
    "Intercept",
    "x2",
    "y"
  ],
  "coefficients": [
    2.721514863793808,
    -0.7696172405071738,
    0.1924250941157753
  ],
  "std_errors": [
    0.1836719626465872,
    0.04322201188534242,
    0.00602965921020192
  ],
  "t_stats": [
    14.81725803208417,
    -17.806141059531953,
    31.913096148153855
  ],
  "p_values": [
    1.1799746135719382e-26,
    2.4830887805998555e-32,
    3.0475673352243404e-53
  ],
  "r_squared": 0.9176697072164618,
  "adj_r_squared": 0.9159721754064919,
  "f_statistic": 540.5905808815186,
  "f_p_value": 2.538887766520692e-53,
  "mse": 0.7120941247658426,
  "std_error": 0.8438566968187445,
  "log_likelihood": -123.3936340160982,
  "aic": 252.7872680321964,
  "bic": 260.6027785901607,
  "conf_int_lower": [
    2.356976860908432,
    -0.8554009696421849,
    0.18045788967752477
  ],
  "conf_int_upper": [
    3.086052866679184,
    -0.6838335113721628,
    0.20439229855402583
  ],
  "residuals": [
    -2.3687057366270396,
    -0.25727688413011496,
    -0.7479601626040342,
    0.2605529150173975,
    -1.1828942763526413,
    -0.7913067428550626,
    0.45951329748318503,
    0.15018129674699754,
    0.3272156525070624,
    2.455262418984721,
    0.8320107540338997,
    0.3843088020977259,
    -1.388824027179314,
    0.565802312538362,
    0.14996073907650143,
    0.6630994406821564,
    -0.03409731440947983,
    0.6135687571876374,
    -1.9402527163168826,
    0.37651508392594235,
    -1.080979145508874,
    0.6671309344282754,
    -0.5413723439998464,
    0.4795070629575058,
    0.08004758773874876,
    -0.9801611107158141,
    0.9203511375616316,
    -0.27880301065856816,
    -0.7198761333777499,
    0.7377674008047332,
    0.1305232294213372,
    0.7661291992596018,
    -0.08700885284489512,
    -0.06467646605613808,
    0.3234287968908456,
    -0.6463633820250969,
    2.129860746907158,
    0.8349396166346237,
    0.062385516838907584,
    -0.29474961696529434,
    0.4529109208956701,
    0.10148609908812478,
    0.15782807917037434,
    0.15931558116278666,
    0.8444753995478127,
    0.3002654541178549,
    -0.5818482663720388,
    -0.7033331411585042,
    0.27327664012984343,
    -0.9710459859190976,
    0.2835641372960329,
    -0.3105168775036029,
    0.11184990185629395,
    0.4033194587740976,
    -1.1492022496935248,
    -0.4806839150948381,
    1.5938184354532439,
    -0.5516170858990197,
    -0.6031319272109616,
    0.19267412193126887,
    -0.02203980875039413,
    0.4622891139104004,
    -1.4871092328150755,
    -1.4430452939245935,
    -0.05964396166001151,
    1.4975791553302562,
    0.09153718394825106,
    0.14680844374429292,
    1.1134570070892167,
    0.0007532948618163005,
    -0.22426885519923268,
    0.08720626554233979,
    1.1647571012100402,
    -1.2187531132946692,
    0.256487627709693,
    0.24721628946895535,
    -0.7747588798179215,
    0.8767797538160265,
    0.44747716319560826,
    -0.1562087847951137,
    0.3781651293358266,
    0.05442664200563874,
    -1.2727261539939256,
    0.37618590575302235,
    -0.5661895659041143,
    1.1325234561508113,
    -0.20876723727262547,
    0.6782446338972381,
    1.482155876761448,
    -0.4875459283325476,
    -0.5143795130001125,
    -1.081231878007852,
    0.652298943150522,
    0.6483726148361306,
    -1.7333836159889446,
    -1.043431903107047,
    0.09413939735172239,
    -0.9746899739696204,
    0.22770718046486493,
    0.6634459626289271
  ],
  "vif": [
    {
      "variable": "x2",
      "vif": 2.1281708071877805,
      "rsquared": 0.5301129041792347
    },
    {
      "variable": "y",
      "vif": 2.1281708071877805,
      "rsquared": 0.5301129041792347
    }
  ]
}