1

I used data HousePrices from package AER for running quantile regression. first i created dummies for categorical variables. then i have run basic ols regression. this is my regression:

myreg1 <- lm(price ~ lotsize + lotsize^2 + bed + bath + store + dummydrive +
             dummyrecreate + dummybase+ dummygas + dummyair + garage + dummypref)

then summary(myreg1) and plotted.but when i tried to do quantile regression i did not get an error but got a warning message when used summary(myqreg1) command.

 myqreg1<-rq(price ~ lotsize + lotsize^2 + bed + bath + store + dummydrive +
             dummyrecreate + dummybase+ dummygas + dummyair + garage + dummypref)

summary(myqreg1)

then i included tau my regression:

qfit2 <- rq(price ~ lotsize + lotsize^2 + bed + bath + store + dummydrive +
            dummyrecreate + dummybase+ dummygas + dummyair + garage + dummypref,
            tau=seq(0.1,0.9,by=0.1))

again got a warning message but now 4 warnings:

i have searched a lot on the internet and could not find the answer.

lmo
  • 37,904
  • 9
  • 56
  • 69
  • 1
    You need to be more clear: Is it an error (as stated in the title) or a warning? What is the error/warning? I assume it's: `Solution may be nonunique`. If so, this can happen due to the kind of optimization problem that quantile regression is solving. Finally, you do not have to create dummies by hand and you have to protect arithmetic operators like `^2` with the `I()` function in regression formulas in R. In the book accompanying the `AER` package this is discussed in Chapters 3.2 and 3.4. – Achim Zeileis Apr 09 '16 at 21:08
  • Make your problem reproducible. Remember to include the names of packages that you are using (eg, `quantreg`) in your posts. This provides a context for those who would like to help. In addition, including the code that you used to 1) load data, 2) create variables can be helpful for those trying to diagnose the problem. Your code should include `library(AER)` and `library(quantreg)` along with a data loading line as well as lines that create any new variables. – lmo Apr 09 '16 at 21:16

0 Answers0