Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rq.fit.br

Quantile Regression Fitting by Exterior Point Methods


Description

This function controls the details of QR fitting by the simplex approach embodied in the algorithm of Koenker and d'Orey based on the median regression algorithm of Barrodale and Roberts. Typically, options controlling the construction of the confidence intervals would be passed via the ...{} argument of rq().

Usage

rq.fit.br(x, y, tau=0.5, alpha=0.1, ci=FALSE, iid=TRUE, interp=TRUE, tcrit=TRUE)

Arguments

x

the design matrix

y

the response variable

tau

the quantile desired, if tau lies outside (0,1) the whole process is estimated.

alpha

the nominal noncoverage probability for the confidence intervals, i.e. 1-alpha is the nominal coverage probability of the intervals.

ci

logical flag if T then compute confidence intervals for the parameters using the rank inversion method of Koenker (1994). See rq() for more details. If F then return only the estimated coefficients. Note that for large problems the default option ci = TRUE can be rather slow. Note also that rank inversion only works for p>1, an error message is printed in the case that ci=T and p=1.

iid

logical flag if T then the rank inversion is based on an assumption of iid error model, if F then it is based on an nid error assumption. See Koenker and Machado (1999) for further details on this distinction.

interp

As with typical order statistic type confidence intervals the test statistic is discrete, so it is reasonable to consider intervals that interpolate between values of the parameter just below the specified cutoff and values just above the specified cutoff. If interp = F then the 2 “exact” values above and below on which the interpolation would be based are returned.

tcrit

Logical flag if T - Student t critical values are used, if F then normal values are used.

Details

If tau lies in (0,1) then an object of class "rq" is returned with various related inference apparatus. If tau lies outside [0,1] then an object of class rq.process is returned. In this case parametric programming methods are used to find all of the solutions to the QR problem for tau in (0,1), the p-variate resulting process is then returned as the array sol containing the primal solution and dsol containing the dual solution. There are roughly O(n log n) distinct solutions, so users should be aware that these arrays may be large and somewhat time consuming to compute for large problems.

Value

Returns an object of class "rq" for tau in (0,1), or else of class "rq.process". Note that rq.fit.br when called for a single tau value will return the vector of optimal dual variables. See rq.object and rq.process.object for further details.

References

Koenker, R. and J.A.F. Machado, (1999) Goodness of fit and related inference processes for quantile regression, J. of Am Stat. Assoc., 94, 1296-1310.

See Also

Examples

data(stackloss)
rq.fit.br(stack.x, stack.loss, tau=.73 ,interp=FALSE)

quantreg

Quantile Regression

v5.85
GPL (>= 2)
Authors
Roger Koenker [cre, aut], Stephen Portnoy [ctb] (Contributions to Censored QR code), Pin Tian Ng [ctb] (Contributions to Sparse QR code), Blaise Melly [ctb] (Contributions to preprocessing code), Achim Zeileis [ctb] (Contributions to dynrq code essentially identical to his dynlm code), Philip Grosjean [ctb] (Contributions to nlrq code), Cleve Moler [ctb] (author of several linpack routines), Yousef Saad [ctb] (author of sparskit2), Victor Chernozhukov [ctb] (contributions to extreme value inference code), Ivan Fernandez-Val [ctb] (contributions to extreme value inference code), Brian D Ripley [trl, ctb] (Initial (2001) R port from S (to my everlasting shame -- how could I have been so slow to adopt R!) and for numerous other suggestions and useful advice)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.