segreg.model.OLSRegressionEstimator.fit¶
- OLSRegressionEstimator.fit(indep, dep)[source]¶
Fit the model to the given data.
The fit automatically includes an intercept. There is no need to add a column of ones to the
indep
input.- Parameters
indep (array-like of shape (num_data,)) – The independent data. Also called predictor, explanatory variable, regressor, or exogenous variable.
dep (array-like of shape (num_data,)) – The dependent data. Also called response, regressand, or endogenous variable.
- Returns
params – The estimated parameters. The returned parameters are, in order, [intercept, slope, sigma].
- Return type
array of shape (num_params,)