statsmodels.stats.diagnostic.CompareJ.run

method

CompareJ.run(results_x, results_z, attach=True)[source]

run J-test for non-nested models

Parameters
results_xResult instance

result instance of first model

results_zResult instance

result instance of second model

attachbool

If true, then the intermediate results are attached to the instance.

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

Notes

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 ??? for more information.

References

???