het_breuschpagan¶
In [ ]:
het_breuschpagan(vdf: vDataFrame,
eps: str,
X: list)
Breusch-Pagan test for heteroscedasticity.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
vdf | vDataFrame | ❌ | input vDataFrame. |
eps | str | ❌ | Input residual vcolumn. |
X | list | ❌ | Exogenous Variables to test the heteroscedasticity on. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [9]:
from verticapy import *
texas = vDataFrame("Texas")
texas.plot(ts = "date", columns = ["cases", "deaths"])
Out[9]:
In [10]:
from verticapy.learn.linear_model import LinearRegression
model = LinearRegression("Texas_deaths_lr")
model.drop()
model.fit(texas, X = ["cases"], y = "deaths")
texas = model.predict(texas, name = "deaths_pred")
texas["eps"] = texas["deaths"] - texas["deaths_pred"]
In [11]:
from verticapy.stats import het_breuschpagan
het_breuschpagan(texas,
eps = "eps",
X = ["cases"])
Out[11]:
