Skip to content

Interface: OlsFit ​

The fit of y = params[0] + params[1] · x (or y = params[0] · x without a constant).

Properties ​

PropertyModifierTypeDescription
bsereadonlyreadonly number[]Standard errors of the coefficients (bse).
dfResidreadonlynumberResidual degrees of freedom: n − number of coefficients (df_resid).
fittedreadonlyreadonly number[]Fitted values, one per observation (fittedvalues).
nobsreadonlynumberNumber of observations used (nobs).
paramNamesreadonlyreadonly string[]Names of the coefficients: ['const', 'x1'] or ['x1'] (statsmodels' exog_names).
paramsreadonlyreadonly number[]Coefficients: [intercept, slope] with a constant, [slope] without (statsmodels' params).
pvaluesreadonlyreadonly number[]Two-sided p-values of the t statistics (pvalues).
rsquaredreadonlynumberCoefficient of determination: centered with a constant, uncentered without (rsquared).
rsquaredAdjreadonlynumberR² adjusted for the degrees of freedom (rsquared_adj).
ssrreadonlynumberSum of squared residuals (ssr).
tvaluesreadonlyreadonly number[]t statistics of the coefficients (tvalues).

Released under the MIT License.