het_white¶
In [ ]:
het_white(vdf: vDataFrame,
eps: str,
X: list)
White’s Lagrange Multiplier 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 [13]:
from verticapy import *
texas = vDataFrame("Texas")
texas.plot(ts = "date", columns = ["cases", "deaths"])
Out[13]:
In [14]:
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 [15]:
from verticapy.stats import het_white
het_white(texas,
eps = "eps",
X = ["cases"])
Out[15]:
