rq: Quantile Regression

Description Usage Arguments Details Value Method References See Also Examples

Description

Returns an object of class "rq" "rqs" or "rq.process" that represents a quantile regression fit.

Usage

1
2
rq(formula, tau=.5, data, subset, weights, na.action,
   method="br", model = TRUE, contrasts, ...) 

Arguments

formula

a formula object, with the response on the left of a ~ operator, and the terms, separated by + operators, on the right.

tau

the quantile(s) to be estimated, this is generally a number strictly between 0 and 1, but if specified strictly outside this range, it is presumed that the solutions for all values of tau in (0,1) are desired. In the former case an object of class "rq" is returned, in the latter, an object of class "rq.process" is returned. As of version 3.50, tau can also be a vector of values between 0 and 1; in this case an object of class "rqs" is returned containing among other things a matrix of coefficient estimates at the specified quantiles.

data

a data.frame in which to interpret the variables named in the formula, or in the subset and the weights argument. If this is missing, then the variables in the formula should be on the search list. This may also be a single number to handle some special cases – see below for details.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

weights

vector of observation weights; if supplied, the algorithm fits to minimize the sum of the weights multiplied into the absolute residuals. The length of weights must be the same as the number of observations. The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous.

na.action

a function to filter missing data. This is applied to the model.frame after any subset argument has been used. The default (with na.fail) is to create an error if any missing values are found. A possible alternative is na.omit, which deletes observations that contain one or more missing values.

model

if TRUE then the model frame is returned. This is essential if one wants to call summary subsequently.

method

the algorithmic method used to compute the fit. There are several options: The default method is the modified version of the Barrodale and Roberts algorithm for l1-regression, used by l1fit in S, and is described in detail in Koenker and d'Orey(1987, 1994), default = "br". This is quite efficient for problems up to several thousand observations, and may be used to compute the full quantile regression process. It also implements a scheme for computing confidence intervals for the estimated parameters, based on inversion of a rank test described in Koenker(1994). For larger problems it is advantageous to use the Frisch–Newton interior point method "fn". And for very large problems one can use the Frisch–Newton approach after preprocessing "pfn". Both of the latter methods are described in detail in Portnoy and Koenker(1997), this method is primarily well-suited for large n, small p problems where the parametric dimension of the model is modest. For large problems with large parametric dimension it is usually advantageous to use method "sfn" which uses the Frisch-Newton algorithm, but exploits sparse algebra to compute iterates. This is typically helpful when the model includes factor variables that, when expanded, generate design matrices that are very sparse. A sixth option "fnc" that enables the user to specify linear inequality constraints on the fitted coefficients; in this case one needs to specify the matrix R and the vector r representing the constraints in the form Rb ≥q r. See the examples. Finally, there are two penalized methods: "lasso" and "scad" that implement the lasso penalty and Fan and Li's smoothly clipped absolute deviation penalty, respectively. These methods should probably be regarded as experimental.

contrasts

a list giving contrasts for some or all of the factors default = NULL appearing in the model formula. The elements of the list should have the same name as the variable and should be either a contrast matrix (specifically, any full-rank matrix with as many rows as there are levels in the factor), or else a function to compute such a matrix given the number of levels.

...

additional arguments for the fitting routines (see rq.fit.br and rq.fit.fnb and the functions they call).

Details

For further details see the vignette available from R with vignette("rq",package="quantreg") and/or the Koenker (2005). For estimation of nonlinear (in parameters) quantile regression models there is the function nlrq and for nonparametric additive quantile regression there is the function rqss. Fitting of quantile regression models with censored data is handled by the crq function.

Value

See rq.object and rq.process.object for details. Inferential matters are handled with summary. There are extractor methods logLik and AIC that are potentially relevant for model selection.

Method

The function computes an estimate on the tau-th conditional quantile function of the response, given the covariates, as specified by the formula argument. Like lm(), the function presumes a linear specification for the quantile regression model, i.e. that the formula defines a model that is linear in parameters. For non-linear quantile regression see the package nlrq(). The function minimizes a weighted sum of absolute residuals that can be formulated as a linear programming problem. As noted above, there are three different algorithms that can be chosen depending on problem size and other characteristics. For moderate sized problems (n << 5,000, p << 20) it is recommended that the default "br" method be used. There are several choices of methods for computing confidence intervals and associated test statistics. See the documentation for summary.rq for further details and options.

References

[1] Koenker, R. W. and Bassett, G. W. (1978). Regression quantiles, Econometrica, 46, 33–50.

[2] Koenker, R.W. and d'Orey (1987, 1994). Computing regression quantiles. Applied Statistics, 36, 383–393, and 43, 410–414.

[3] Gutenbrunner, C. Jureckova, J. (1991). Regression quantile and regression rank score process in the linear model and derived statistics, Annals of Statistics, 20, 305–330.

[4] Koenker, R. W. (1994). Confidence Intervals for regression quantiles, in P. Mandl and M. Huskova (eds.), Asymptotic Statistics, 349–359, Springer-Verlag, New York.

[5] Koenker, R. and S. Portnoy (1997) The Gaussian Hare and the Laplacean Tortoise: Computability of Squared-error vs Absolute Error Estimators, (with discussion). Statistical Science, 12, 279-300.

[6] Koenker, R. W. (2005). Quantile Regression, Cambridge U. Press.

There is also recent information available at the URL: http://www.econ.uiuc.edu.

See Also

FAQ, summary.rq, nlrq, rq.fit, rq.wfit, rqss, rq.object, rq.process.object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data(stackloss)
rq(stack.loss ~ stack.x,.5)  #median (l1) regression  fit for the stackloss data. 
rq(stack.loss ~ stack.x,.25)  #the 1st quartile, 
        #note that 8 of the 21 points lie exactly on this plane in 4-space! 
rq(stack.loss ~ stack.x, tau=-1)   #this returns the full rq process
rq(rnorm(50) ~ 1, ci=FALSE)    #ordinary sample median --no rank inversion ci
rq(rnorm(50) ~ 1, weights=runif(50),ci=FALSE)  #weighted sample median 
#plot of engel data and some rq lines see KB(1982) for references to data
data(engel)
attach(engel)
plot(income,foodexp,xlab="Household Income",ylab="Food Expenditure",type = "n", cex=.5)
points(income,foodexp,cex=.5,col="blue")
taus <- c(.05,.1,.25,.75,.9,.95)
xx <- seq(min(income),max(income),100)
f <- coef(rq((foodexp)~(income),tau=taus))
yy <- cbind(1,xx)%*%f
for(i in 1:length(taus)){
        lines(xx,yy[,i],col = "gray")
        }
abline(lm(foodexp ~ income),col="red",lty = 2)
abline(rq(foodexp ~ income), col="blue")
legend(3000,500,c("mean (LSE) fit", "median (LAE) fit"),
	col = c("red","blue"),lty = c(2,1))
#Example of plotting of coefficients and their confidence bands
plot(summary(rq(foodexp~income,tau = 1:49/50,data=engel)))
#Example to illustrate inequality constrained fitting
n <- 100
p <- 5
X <- matrix(rnorm(n*p),n,p)
y <- .95*apply(X,1,sum)+rnorm(n)
#constrain slope coefficients to lie between zero and one
R <- cbind(0,rbind(diag(p),-diag(p)))
r <- c(rep(0,p),-rep(1,p))
rq(y~X,R=R,r=r,method="fnc")

Example output

Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Call:
rq(formula = stack.loss ~ stack.x, tau = 0.5)

Coefficients:
      (Intercept)   stack.xAir.Flow stack.xWater.Temp stack.xAcid.Conc. 
     -39.68985507        0.83188406        0.57391304       -0.06086957 

Degrees of freedom: 21 total; 17 residual
Call:
rq(formula = stack.loss ~ stack.x, tau = 0.25)

Coefficients:
      (Intercept)   stack.xAir.Flow stack.xWater.Temp stack.xAcid.Conc. 
     -3.60000e+01       5.00000e-01       1.00000e+00      -4.57967e-16 

Degrees of freedom: 21 total; 17 residual
$sol
                          [,1]        [,2]          [,3]          [,4]
tau                 0.00000000   0.1240939  1.300537e-01  1.303646e-01
Qbar               13.45404984  13.9936756  1.530952e+01  1.530952e+01
Obj.Fun             0.00000000  10.6056828  1.104750e+01  1.106196e+01
(Intercept)       -29.01401869 -36.0781250 -3.600000e+01 -3.600000e+01
stack.xAir.Flow     0.31542056   0.3515625  5.000000e-01  5.000000e-01
stack.xWater.Temp   1.22429907   1.7500000  1.000000e+00  1.000000e+00
stack.xAcid.Conc.  -0.02803738  -0.0937500 -1.443290e-15 -4.758099e-16
                           [,5]          [,6]          [,7]          [,8]
tau                1.494253e-01  1.607143e-01  1.945662e-01  2.231167e-01
Qbar               1.530952e+01  1.530952e+01  1.530952e+01  1.530952e+01
Obj.Fun            1.194828e+01  1.247321e+01  1.404733e+01  1.537493e+01
(Intercept)       -3.600000e+01 -3.600000e+01 -3.600000e+01 -3.600000e+01
stack.xAir.Flow    5.000000e-01  5.000000e-01  5.000000e-01  5.000000e-01
stack.xWater.Temp  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00
stack.xAcid.Conc. -4.758099e-16 -1.400996e-16 -8.679925e-17 -4.758099e-16
                           [,9]        [,10]       [,11]       [,12]
tau                2.539683e-01   0.27510618   0.3310042   0.3749882
Qbar               1.530952e+01  16.16141457  16.4441422  16.8013416
Obj.Fun            1.680952e+01  17.79243732  19.3916975  20.3889465
(Intercept)       -3.600000e+01 -37.89705882 -38.5266594 -32.6377709
stack.xAir.Flow    5.000000e-01   0.75735294   0.8427639   0.8250774
stack.xWater.Temp  1.000000e+00   0.79411765   0.7257889   0.7399381
stack.xAcid.Conc. -4.758099e-16  -0.09803922  -0.1305767  -0.1857585
                        [,13]        [,14]        [,15]        [,16]
tau                 0.3918757   0.40948814   0.48984468   0.56478766
Qbar               16.9593496  17.42450639  17.43436853  17.44517734
Obj.Fun            20.6451613  20.85393258  21.02150538  21.16226784
(Intercept)       -33.2461197 -39.65188470 -39.68985507 -39.73147023
stack.xAir.Flow     0.8492239   0.83037694   0.83188406   0.83353584
stack.xWater.Temp   0.6274945   0.58093126   0.57391304   0.56622114
stack.xAcid.Conc.  -0.1662971  -0.06208426  -0.06086957  -0.05953827
                        [,17]         [,18]         [,19]       [,20]
tau                 0.5923717   0.604223291   0.619988864   0.6511309
Qbar               17.4565950  19.136255092  19.137513359  19.1484286
Obj.Fun            21.2078167  21.224545264  20.690701559  19.6353667
(Intercept)       -39.6814159 -54.032448378 -54.064837905 -54.0700000
stack.xAir.Flow     0.8362832   0.873156342   0.872817955   0.8710000
stack.xWater.Temp   0.5663717   0.979351032   0.980049875   0.9840000
stack.xAcid.Conc.  -0.0619469  -0.002949853  -0.002493766  -0.0020000
                          [,21]         [,22]        [,23]        [,24]
tau                6.897262e-01  7.621009e-01   0.76843239   0.77392070
Qbar               1.915640e+01  1.919264e+01  19.71524260  19.98904006
Obj.Fun            1.831861e+01  1.583728e+01  15.61539215  15.36281938
(Intercept)       -5.418966e+01 -5.409091e+01 -54.33806147 -56.68253968
stack.xAir.Flow    8.706897e-01  8.636364e-01   0.77659574   0.78571429
stack.xWater.Temp  9.827586e-01  1.000000e+00   1.18912530   1.25396825
stack.xAcid.Conc. -5.698567e-16 -5.843653e-16   0.02364066   0.03174603
                         [,25]       [,26]        [,27]       [,28]       [,29]
tau                 0.77767777   0.8142857   0.83392070   0.9130604   1.0000000
Qbar               20.12133072  20.1607143  20.20634921  21.7007310  21.7007310
Obj.Fun            15.16831683  13.1714286  12.08414097   7.6259394   0.0000000
(Intercept)       -58.54794521 -59.3750000 -58.54331865 -58.4619970 -58.4619970
stack.xAir.Flow     0.80821918   0.8062500   0.79295154   0.5245902   0.5245902
stack.xWater.Temp   1.27397260   1.2562500   1.30543319   1.8584203   1.8584203
stack.xAcid.Conc.   0.03424658   0.0500000   0.03817915   0.1073025   0.1073025

$dsol
      [,1]       [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
 [1,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [2,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [3,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [4,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [5,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [6,]    1 1.00000000 1.0000000 0.9541788 0.6063218 0.4598214 0.0000000
 [7,]    1 1.00000000 0.9598530 1.0000000 1.0000000 1.0000000 1.0000000
 [8,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [9,]    1 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
[10,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[11,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[12,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[13,]    1 1.00000000 1.0000000 1.0000000 1.0000000 0.9107143 0.6737511
[14,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[15,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[16,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 0.8871604
[17,]    1 0.85416063 0.8306474 0.8609229 0.9589491 1.0000000 1.0000000
[18,]    1 1.00000000 1.0000000 1.0000000 0.2967980 0.2544643 0.3531989
[19,]    1 0.49869527 0.4783715 0.4472410 1.0000000 1.0000000 1.0000000
[20,]    1 1.00000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[21,]    1 0.04117135 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
           [,8]      [,9]     [,10]     [,11]     [,12]     [,13]     [,14]
 [1,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [2,] 1.0000000 1.0000000 1.0000000 1.0000000 0.8253325 0.7371565 0.7253433
 [3,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [4,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [5,] 1.0000000 1.0000000 1.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [6,] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [7,] 0.7038528 0.3650794 0.1790656 0.2871626 0.1795718 0.1720430 0.0000000
 [8,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
 [9,] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
[10,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.8202247
[11,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[12,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[13,] 0.3364002 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
[14,] 1.0000000 1.0000000 0.7003699 0.5080148 0.1203433 0.0000000 0.0000000
[15,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[16,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[17,] 1.0000000 0.8526077 0.3433347 0.2537334 0.0000000 0.0000000 0.0000000
[18,] 0.2742956 0.4489796 1.0000000 1.0000000 1.0000000 0.8614098 0.8551810
[19,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[20,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[21,] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
          [,15]     [,16]        [,17]     [,18]        [,19]     [,20]
 [1,] 1.0000000 1.0000000 1.000000e+00 1.0000000 8.887806e-01 0.6723783
 [2,] 0.6714456 0.1067666 0.000000e+00 0.0000000 0.000000e+00 0.0000000
 [3,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
 [4,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
 [5,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
 [6,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
 [7,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
 [8,] 0.2150538 0.2590420 1.254120e-01 0.0000000 0.000000e+00 0.0000000
 [9,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
[10,] 0.0000000 0.0000000 0.000000e+00 0.0000000 3.439617e-10 0.2789582
[11,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
[12,] 1.0000000 1.0000000 8.457071e-01 0.7093874 6.948775e-01 0.3749143
[13,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
[14,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
[15,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
[16,] 1.0000000 0.0000000 5.836139e-10 0.1670500 0.000000e+00 0.0000000
[17,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
[18,] 0.8267622 0.7736505 5.890755e-01 0.4348735 3.965757e-01 0.0000000
[19,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
[20,] 1.0000000 1.0000000 1.000000e+00 1.0000000 1.000000e+00 1.0000000
[21,] 0.0000000 0.0000000 0.000000e+00 0.0000000 0.000000e+00 0.0000000
          [,21]        [,22]      [,23]     [,24]     [,25]     [,26]
 [1,] 0.4395718 5.149331e-02 0.03681582 0.0000000 0.0000000 0.0000000
 [2,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
 [3,] 1.0000000 1.000000e+00 1.00000000 1.0000000 1.0000000 0.8142857
 [4,] 1.0000000 1.000000e+00 1.00000000 1.0000000 1.0000000 1.0000000
 [5,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
 [6,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
 [7,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
 [8,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
 [9,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[10,] 0.4703521 6.178052e-01 0.54665622 0.5090749 0.6273627 0.9000000
[11,] 1.0000000 3.265820e-01 0.00000000 0.0000000 0.0000000 0.0000000
[12,] 0.0000000 1.715086e-09 0.27944776 0.3048458 0.2106211 0.0000000
[13,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[14,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[15,] 1.0000000 1.000000e+00 1.00000000 0.9337445 1.0000000 1.0000000
[16,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[17,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[18,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[19,] 0.6058266 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
[20,] 1.0000000 1.000000e+00 1.00000000 1.0000000 0.8307831 0.1857143
[21,] 0.0000000 0.000000e+00 0.00000000 0.0000000 0.0000000 0.0000000
             [,27]      [,28] [,29]
 [1,] 0.000000e+00 0.00000000     0
 [2,] 0.000000e+00 0.00000000     0
 [3,] 6.850220e-01 0.02552475     0
 [4,] 1.000000e+00 1.00000000     0
 [5,] 0.000000e+00 0.00000000     0
 [6,] 0.000000e+00 0.00000000     0
 [7,] 0.000000e+00 0.00000000     0
 [8,] 0.000000e+00 0.00000000     0
 [9,] 0.000000e+00 0.00000000     0
[10,] 9.057269e-01 0.27260948     0
[11,] 0.000000e+00 0.00000000     0
[12,] 2.573799e-10 0.52759782     0
[13,] 0.000000e+00 0.00000000     0
[14,] 0.000000e+00 0.00000000     0
[15,] 8.969163e-01 0.00000000     0
[16,] 0.000000e+00 0.00000000     0
[17,] 0.000000e+00 0.00000000     0
[18,] 0.000000e+00 0.00000000     0
[19,] 0.000000e+00 0.00000000     0
[20,] 0.000000e+00 0.00000000     0
[21,] 0.000000e+00 0.00000000     0

$fitted.values
numeric(0)

$formula
stack.loss ~ stack.x

$terms
stack.loss ~ stack.x
attr(,"variables")
list(stack.loss, stack.x)
attr(,"factors")
           stack.x
stack.loss       0
stack.x          1
attr(,"term.labels")
[1] "stack.x"
attr(,"order")
[1] 1
attr(,"intercept")
[1] 1
attr(,"response")
[1] 1
attr(,".Environment")
<environment: R_GlobalEnv>
attr(,"predvars")
list(stack.loss, stack.x)
attr(,"dataClasses")
 stack.loss     stack.x 
  "numeric" "nmatrix.3" 

$xlevels
named list()

$call
rq(formula = stack.loss ~ stack.x, tau = -1)

$tau
[1] -1

$rho
$rho$x
 [1] 0.0000000 0.1240939 0.1300537 0.1303646 0.1494253 0.1607143 0.1945662
 [8] 0.2231167 0.2539683 0.2751062 0.3310042 0.3749882 0.3918757 0.4094881
[15] 0.4898447 0.5647877 0.5923717 0.6042233 0.6199889 0.6511309 0.6897262
[22] 0.7621009 0.7684324 0.7739207 0.7776778 0.8142857 0.8339207 0.9130604
[29] 1.0000000

$rho$y
 [1]  0.000000 10.605683 11.047498 11.061955 11.948276 12.473214 14.047327
 [8] 15.374928 16.809524 17.792437 19.391697 20.388947 20.645161 20.853933
[15] 21.021505 21.162268 21.207817 21.224545 20.690702 19.635367 18.318612
[22] 15.837281 15.615392 15.362819 15.168317 13.171429 12.084141  7.625939
[29]  0.000000


$method
[1] "br"

$model
   stack.loss stack.x.Air.Flow stack.x.Water.Temp stack.x.Acid.Conc.
1          42               80                 27                 89
2          37               80                 27                 88
3          37               75                 25                 90
4          28               62                 24                 87
5          18               62                 22                 87
6          18               62                 23                 87
7          19               62                 24                 93
8          20               62                 24                 93
9          15               58                 23                 87
10         14               58                 18                 80
11         14               58                 18                 89
12         13               58                 17                 88
13         11               58                 18                 82
14         12               58                 19                 93
15          8               50                 18                 89
16          7               50                 18                 86
17          8               50                 19                 72
18          8               50                 19                 79
19          9               50                 20                 80
20         15               56                 20                 82
21         15               70                 20                 91

attr(,"class")
[1] "rq.process"
Call:
rq(formula = rnorm(50) ~ 1, ci = FALSE)

Coefficients:
(Intercept) 
0.002913892 

Degrees of freedom: 50 total; 49 residual
Warning message:
In rq.fit.br(x, y, tau = tau, ...) : Solution may be nonunique
Call:
rq(formula = rnorm(50) ~ 1, weights = runif(50), ci = FALSE)

Coefficients:
 (Intercept) 
-0.001028362 

Degrees of freedom: 50 total; 49 residual
Warning messages:
1: In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) :
  Solution may be nonunique
2: In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) :
  Solution may be nonunique
3: In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) :
  Solution may be nonunique
4: In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) :
  Solution may be nonunique
Call:
rq(formula = y ~ X, method = "fnc", R = R, r = r)

Coefficients:
(Intercept)          X1          X2          X3          X4          X5 
-0.03177479  0.90105814  1.00000000  1.00000000  0.92353122  1.00000000 

Degrees of freedom: 100 total; 94 residual

quantreg documentation built on July 15, 2019, 5:02 p.m.