Skip to content

Instantly share code, notes, and snippets.

@ccadek
Created May 25, 2017 09:46
Show Gist options
  • Save ccadek/e0570ab12c2674c090cdce0fbbce4b32 to your computer and use it in GitHub Desktop.
Save ccadek/e0570ab12c2674c090cdce0fbbce4b32 to your computer and use it in GitHub Desktop.
x <- as.numeric(flu1$Date)
y <- flu1$Paraguay
yhat <- trend3$fitted
r <- trend3$residuals
rplus <- lowess(x[sign(r)==1],yhat[sign(r)==1],f=2/3)$y
rminus <- lowess(x[sign(r)==-1],yhat[sign(r)==-1],f=2/3)$y
plot(x,y,xlab="Anteil Winterschlaf [%]",ylab="Alter zum Todeszeitpunkt [Tage]")
lines(x[sign(r)==1],yhat[sign(r)==1]+rplus)
lines(x[sign(r)==-1],yhat[sign(r)==-1]+rminus)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment