Closed MKLau closed 10 years ago
Index = time Run = 1 Prey = 5 b = 8 a = 40 K = 0.1 d = -1
x = oxygen concentration from run 1
Detrending and decycling was performed using the sddSens function (above).
Aaron checked and said they looked ok. See email from June 24.
x = oxygen from a run cx = oxygen from associated control with the same parameter values eval = proportion of points used for constructing the spline
sddSens <- function(x,cx,eval=100){
1. standardize (xi - xbar) / sdx
x <- (x - mean(x))/sd(x) cx <- (cx - mean(cx))/sd(cx)
2. fit function using loess
fit.x <- loess.smooth(x=(1:length(x)),y=x,evaluation=eval) fit.cx <- loess.smooth(x=(1:length(x)),y=cx,evaluation=eval)
3. detrend and decycle by subtracting the loess of controls
fit.x$y-fit.cx$y }