I hope you can help me. I am new to "R" and am working through the
example of quantile regression analysis in the paper by Roger Koenker
(quantile regression in R: a Vignette. I got to page 6 and in trying to
execute the following code I received the error below. I have searched
on the web and while I have found similar error messages, I have not
been able to ascertain the root cause. Any assistance would be
appreciated. Basically, is this a bug in the program or in the coding,
or does this function not work in the versions that I have downloaded.
I have downloaded: R 2.4.0 and quantreg 4.0.1 and SparseM. Am I missing
something?
> xx <- x -mean(x)
> fit1 <- summary(rq(y ~ xx, tau = 2:98/100))
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, :
variable lengths differ (found for 'xx')
> fit1 <- summary(rq(y ~ xx, tau = 2:98/100))
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, :
variable lengths differ (found for 'xx')
> traceback()
7: model.frame.default(formula = y ~ xx, drop.unused.levels = TRUE)
6: model.frame(formula = y ~ xx, drop.unused.levels = TRUE)
5: eval(expr, envir, enclos)
4: eval(expr, p)
3: eval.parent(mf)
2: rq(y ~ xx, tau = 2:98/100)
1: summary(rq(y ~ xx, tau = 2:98/100))
Les Stanfield
Ministry of Natural Resources and
University of Toronto,
mail to: Glenora Fisheries Station, RR 4
Picton, On. K0K 2T0
M, T, (613)-476-8777
W, T, F (416)-946-7232
[[alternative HTML version deleted]]