linearmodels.iv.results.IVModelComparison

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

Comparison of multiple models.

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

Set of results to compare, which are IVResults, IVGMMResults or OLSResults. If a dict, the keys will be used as model names.

precision: str = 'tstats'

Estimator precision estimator to include in the comparison output. The default is “tstats”. The names are not case sensitive.

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. The default is False.

Raises:
  • TypeError – If a result is not an IVResults, IVGMMResults or OLSResults.

  • ValueError – If precision is not supported.

Methods

Properties

cov_estimator

Covariance estimator descriptions.

estimator_method

Estimation methods.

f_statistic

F-statistics and P-values of all models.

nobs

Number of observations used to estimate each model.

params

Parameter estimates of all models.

pvalues

Parameter p-values of all models.

rsquared

Coefficients of determination (R**2).

rsquared_adj

Sample-size adjusted coefficients of determination (R**2).

std_errors

Parameter standard errors of all models.

summary

Model estimation summary.

tstats

Parameter t-statistics of all models.