# statsmodels.stats.diagnostic.linear_reset¶

statsmodels.stats.diagnostic.linear_reset(res, power=3, test_type='fitted', use_f=False, cov_type='nonrobust', cov_kwargs=None)[source]

Ramsey’s RESET test for neglected nonlinearity

Parameters
resRegressionResults

A results instance from a linear regression.

power{int, List[int]}, default 3

The maximum power to include in the model, if an integer. Includes powers 2, 3, …, power. If an list of integers, includes all powers in the list.

test_typestr, default “fitted”

The type of augmentation to use:

• “fitted” : (default) Augment regressors with powers of fitted values.

• “exog” : Augment exog with powers of exog. Excludes binary regressors.

• “princomp”: Augment exog with powers of first principal component of exog.

use_fbool, default False

Flag indicating whether an F-test should be used (True) or a chi-square test (False).

cov_typestr, default “nonrobust

Covariance type. The default is “nonrobust which uses the classic OLS covariance estimator. Specify one of “HC0”, “HC1”, “HC2”, “HC3” to use White’s covariance estimator. All covariance types supported by OLS.fit are accepted.

cov_kwargsdict, default None

Dictionary of covariance options passed to OLS.fit. See OLS.fit for more details.

Returns
ContrastResults`

Test results for Ramsey’s Reset test. See notes for implementation details.

Notes

The RESET test uses an augmented regression of the form

$Y = X\beta + Z\gamma + \epsilon$

where $$Z$$ are a set of regressors that are one of:

• Powers of $$X\hat{\beta}$$ from the original regression.

• Powers of $$X$$, excluding the constant and binary regressors.

• Powers of the first principal component of $$X$$. If the model includes a constant, this column is dropped before computing the principal component. In either case, the principal component is extracted from the correlation matrix of remaining columns.

The test is a Wald test of the null $$H_0:\gamma=0$$. If use_f is True, then the quadratic-form test statistic is divided by the number of restrictions and the F distribution is used to compute the critical value.