Fit quantile regression. Different number of rows test/training

190 Views Asked by At

I need to fit quantile regression to my data. I use code like this:

library(quantreg)
quantreg25 <- rq(Y ~ X, tau = 0.25)
P <- predict.rq(quantreg25, newdata=test)

However, I get error message:

Warning message:
'newdata' had 60000 rows but variables found have 30000 rows

I have 30k rows in my training set, and like 60k in test set. Scriprt works, however, it creates only 30k values, not 60k expected. How may I fit and predict Y value in the test set using quantile regression here?

0

There are 0 best solutions below