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

rq.object

Linear Quantile Regression Object


Description

These are objects of class "rq". They represent the fit of a linear conditional quantile function model.

Details

The coefficients, residuals, and effects may be extracted by the generic functions of the same name, rather than by the $ operator. For pure rq objects this is less critical than for some of the inheritor classes. In particular, for fitted rq objects using "lasso" and "scad" penalties, logLik and AIC functions compute degrees of freedom of the fitted model as the number of estimated parameters whose absolute value exceeds a threshold edfThresh. By default this threshold is 0.0001, but this can be passed via the AIC function if this value is deemed unsatisfactory. The function AIC is a generic function in R, with parameter k that controls the form of the penalty: the default value of k is 2 which yields the classical Akaike form of the penalty, while k <= 0 yields the Schwarz (BIC) form of the penalty. Note that the extractor function coef returns a vector with missing values omitted.

Generation

This class of objects is returned from the rq function to represent a fitted linear quantile regression model.

Methods

The "rq" class of objects has methods for the following generic functions: coef, effects , formula , labels , model.frame , model.matrix , plot , logLik , AIC , extractAIC , predict , print , print.summary , residuals , summary

Structure

The following components must be included in a legitimate rq object.

coefficients

the coefficients of the quantile regression fit. The names of the coefficients are the names of the single-degree-of-freedom effects (the columns of the model matrix). If the model was fitted by method "br" with ci=TRUE, then the coefficient component consists of a matrix whose first column consists of the vector of estimated coefficients and the second and third columns are the lower and upper limits of a confidence interval for the respective coefficients.

residuals

the residuals from the fit.

dual

the vector dual variables from the fit.

rho

The value(s) of objective function at the solution.

contrasts

a list containing sufficient information to construct the contrasts used to fit any factors occurring in the model. The list contains entries that are either matrices or character vectors. When a factor is coded by contrasts, the corresponding contrast matrix is stored in this list. Factors that appear only as dummy variables and variables in the model that are matrices correspond to character vectors in the list. The character vector has the level names for a factor or the column labels for a matrix.

model

optionally the model frame, if model=TRUE.

x

optionally the model matrix, if x=TRUE.

y

optionally the response, if y=TRUE.

See Also


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.