The nec.fun will have to be modified to return the coef I think. but I'll let Mikko look into that unless I get bored this week-end!

Here is the code I've been using to test the verbose option in detrend.series:
gt <- 0.5 * exp (-0.05 * 1:200) + 0.2
noise <- c(arima.sim(model = list(ar = 0.7), n = 200, mean = 1, sd = 0.5))
series <- gt * noise

flat.noise <- c(arima.sim(model = list(ar = 0.7), n = 200, mean = 7, sd = 0.5))
neg.noise <- flat.noise + seq(0,-2,length.out=200)
pos.noise <- flat.noise + seq(0,2,length.out=200)


nls.ok <- detrend.series(y = series, y.name = "Foo", method="ModNegExp", verbose=TRUE)
nls.fails.lm.ok <- detrend.series(y = neg.noise, y.name = "Foo", method="ModNegExp", verbose=TRUE)
nls.fails.lm.fails <- detrend.series(y = pos.noise, y.name = "Foo", method="ModNegExp", verbose=TRUE)


git-svn-id: svn://svn.r-forge.r-project.org/svnroot/dplr@812 edb9625f-4e0d-4859-8d74-9fd3b1da38cb