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) 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) Cheers, Nuru -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: prey.pred.len.NS.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130822/92f16263/attachment.txt>
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