Skip to main content

ols_regression

Perform Ordinary Least Squares (OLS) regression.

OLS regression is a fundamental statistical method to explore and model the relationship between a dependent variable and one or more independent variables. By fitting the best possible linear equation to the data, it helps uncover how changes in the independent variables are associated with changes in the dependent variable. This returns the model and results objects from statsmodels library.

Parameters

data: list[openbb_core.provider.abstract.data.Data]

Input dataset.

Optional: False


y_column: str

Target column.

Optional: False


x_columns: list[str]

list of columns to use as exogenous variables.

Optional: False


Returns

results: list[dict]

Serializable results.


provider: None

Provider name.


warnings: Optional[list[Warning_]]

list of warnings.


chart: Optional[Chart]

Chart object.


extra: dict[str, Any]

Extra info.


On this page