Commit f3080adb authored by GAREL Marc's avatar GAREL Marc
Browse files

Addition quantile curve

parent cfc001f4
......@@ -24,6 +24,7 @@ shinyServer(function(input, output) {
x=rep(dd[,1],ncol(dd)-1)
y=unlist(dd[,2:ncol(dd)])
crssce=data.frame(y,x)
require("quantreg")
# limit axes extended
maxx=max(x,na.rm=T)+(max(x,na.rm=T)/4)
maxy=max(y,na.rm=T)+(max(y,na.rm=T)/4)
......@@ -36,6 +37,14 @@ shinyServer(function(input, output) {
plot(x,y)
points(x,y,xlim=c(0,maxx),ylim=c(0,maxy),xlab="temps(h)",ylab="DO600nm",las=1,pch=22,bg=1)
lines(w0,SSlogis(w0,coef[1],coef[2],coef[3]),lwd=1.5)
q1b=nlrq(y~SSlogis(x,K, xmid, r),tau=0.25,data=crssce)
q3b=nlrq(y~SSlogis(x,K, xmid, r),tau=0.75,data=crssce)
q05b=nlrq(y~SSlogis(x,K, xmid, r),tau=0.025,data=crssce)
q95b=nlrq(y~SSlogis(x,K, xmid, r),tau=0.975,data=crssce)
lines(w0, predict(q1b, newdata=list(x=w0)), col="blue",lty=2)
lines(w0, predict(q3b, newdata=list(x=w0)), col="blue",lty=2)
lines(w0, predict(q05b, newdata=list(x=w0)), col="blue",lty=3)
lines(w0, predict(q95b, newdata=list(x=w0)), col="blue",lty=3)
observeEvent(input$clicks, {print(as.numeric(do$data))})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment