statsmodels.stats.diagnostic.compare_j

statsmodels.stats.diagnostic.compare_j(results_x, results_z, store=False)[source]

Compute the J-test for non-nested models

Parameters
results_xRegressionResults

The result instance of first model.

results_zRegressionResults

The result instance of second model.

storebool, default False

If true, then the intermediate results are returned.

Returns
tstatfloat

t statistic for the test that including the fitted values of the first model in the second model has no effect.

pvaluefloat

two-sided pvalue for the t statistic

res_storeResultsStore, optional

Intermediate results. Returned if store is True.

Notes

From description in Greene, section 8.3.3. Matches results for Example 8.3, Greene.

Tests of non-nested hypothesis might not provide unambiguous answers. The test should be performed in both directions and it is possible that both or neither test rejects. see Greene for more information.

References

1

Greene, W. H. Econometric Analysis. New Jersey. Prentice Hall; 5th edition. (2002).