statsmodels.regression.quantile_regression.QuantReg.fit#

QuantReg.fit(q=0.5, vcov='robust', kernel='epa', bandwidth='hsheather', max_iter=1000, p_tol=1e-06, **kwargs)[source]#

Solve by Iterative Weighted Least Squares

Parameters:
qfloat, optional

Quantile must be strictly between 0 and 1.

vcov{‘robust’, ‘iid’}, optional

Method used to calculate the variance-covariance matrix of the parameters. Default is robust:

  • robust : heteroskedasticity robust standard errors (as suggested in Greene 6th edition)

  • iid : iid errors (as in Stata 12)

kernel{‘biw’, ‘cos’, ‘epa’, ‘gau’, ‘par’}, optional

Kernel to use in the kernel density estimation for the asymptotic covariance matrix:

  • biw: Biweight

  • epa: Epanechnikov

  • cos: Cosine

  • gau: Gaussian

  • par: Parzen

bandwidth{‘hsheather’, ‘bofinger’, ‘chamberlain’}, optional

Bandwidth selection method in kernel density estimation for asymptotic covariance estimate (full references in QuantReg docstring):

  • hsheather: Hall-Sheather (1988)

  • bofinger: Bofinger (1975)

  • chamberlain: Chamberlain (1994)

max_iterint, optional

Maximum number of iterations.

p_tolfloat, optional

Convergence tolerance for the iterative parameter estimates.

**kwargs

Additional keyword arguments, accepted for API compatibility.

Returns:
RegressionResultsWrapper

Results instance for the fitted quantile regression, with additional q, iterations, sparsity, bandwidth, and history attributes.