florian
florian

Reputation: 696

R returning zero / NULL coefficients with quantreg quantile regression package

I am using the quantreg package to compute quantile regressions in R. I invoke my QR using the following command.

quantGsReg15 <- rq(gsRMSD ~ kMeanGrp + medianDurationMS + flightHours + 
                   flightHoursType + landings30days + privPilot + afterKSS,
                   tau = .15 , data = accumulatedNM , method="fn")
summary(quantGsReg15)

Now if I look at the return the coefficients for the variables flightHours and flightHoursType are zero/NULL.

tau: [1] 0.15

Coefficients:
                 coefficients   lower bd       upper bd      
(Intercept)        1.080000e-03  -1.381000e-02   1.618000e-02
kMeanGrp2          1.510000e-03 -1.797693e+308   1.510000e-03
kMeanGrp3          6.170000e-03  -2.630000e-03  1.797693e+308
medianDurationMS  -1.000000e-05  -4.000000e-05   3.000000e-05
flightHours        0.000000e+00   0.000000e+00   0.000000e+00
flightHoursType    0.000000e+00   0.000000e+00   1.000000e-05
landings30days     3.000000e-05  -6.600000e-04   3.600000e-04
privPilotyes       4.440000e-03 -1.797693e+308   1.380000e-02
afterKSS           3.000000e-05  -1.130000e-03   2.250000e-03

When adding se = "nid" I also get a warning message:

Warning message: In summary.rq(quantGsReg15, se = "nid") : 7 non-positive fis

An OLS regression I computed before indicates that this is most likely not be the case. I experimented with different QR methods ( method = "fn") but without success.

Invoking the same commands for the 0.5 quantile returns a similar output. However, I get a different warning message:

Warning message: In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) : Solution may be nonunique

What am I doing wrong? I googled for 30minutes now but without success.

Upvotes: 2

Views: 1355

Answers (1)

florian
florian

Reputation: 696

PS: I did some more testing and multiplied my dependent variable by 10000 and calculated the same regression, now the output looks fine. Could it be that there is some sort of rounding going an as I am calculating several digits behind the comma?

Call: rq(formula = gsRMSD10k ~ kMeanGrp + medianDurationMS + flightHours + 
    flightHoursType + landings30days + privPilot + afterKSS, 
    tau = 0.15, data = accumulatedNM, method = "fn")

tau: [1] 0.15

Coefficients:
                 Value     Std. Error t value   Pr(>|t|) 
(Intercept)       10.80968 101.20390    0.10681   0.91563
kMeanGrp2         15.09255  24.98586    0.60404   0.55021
kMeanGrp3         61.70173  28.31814    2.17888   0.03706
medianDurationMS  -0.06609   0.15616   -0.42323   0.67505
flightHours        0.00948   0.00183    5.19156   0.00001
flightHoursType    0.02038   0.00595    3.42483   0.00175
landings30days     0.28104   1.91373    0.14685   0.88420
privPilotyes      44.41189  28.79167    1.54253   0.13309
afterKSS           0.31738   6.38128    0.04974   0.96065
Warning message:
In summary.rq(quantGsReg15, se = "nid") : 5 non-positive fis

Upvotes: 1

Related Questions