[R] Quanteg problem in R
David Winsemius
dwinsemius at comcast.net
Thu Aug 22 23:07:45 CEST 2013
On Aug 22, 2013, at 9:23 AM, Garkuwa, Nuru Adamu wrote:
> I used the codes below trying to fit a model at .95 c.i. of size relationship but it fails.
>
> library(quantreg)
> range(len$length) # [1] 28 98
> range(len$preyl)
> x<-rq(len$preyl~len$length,tau=0.95)
> plot(x, type="b", xlab="length (cm)",ylab="preyl (cm)",ylim=c(5,35), xlim=c(10,100), data=len)
>
Try:
plot(preyl~length, data=len)
lines(28:98, predict(x, newdata=list(length=28:98)) )
--
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list