linearmodels.iv.results.compare

linearmodels.iv.results.compare(results: dict[str, IVResults | IVGMMResults | OLSResults] | Sequence[IVResults | IVGMMResults | OLSResults], *, precision: str = 'tstats', stars: bool = False) IVModelComparison[source]

Compare the results of multiple models

Parameters:
results: dict[str, IVResults | IVGMMResults | OLSResults] | Sequence[IVResults | IVGMMResults | OLSResults]

Set of results to compare. If a dict, the keys will be used as model names.

precision: str = 'tstats'

Estimator precision estimator to include in the comparison output. Default is “tstats”.

stars: bool = False

Add stars based on the p-value of the coefficient where 1, 2 and 3-stars correspond to p-values of 10%, 5% and 1%, respectively.

Returns:

The model comparison object.

Return type:

linearmodels.iv.results.IVModelComparison