[R] first derivative of a time series

From: gj <joueg_at_tcd.ie>
Date: Fri 13 Jan 2006 - 22:14:54 EST


I need to derive a time series that represents the first derivative of an original time series. The function coefDeriv in the cyclones package seemed to be the ticket, but I'm not sure if I am interpreting the output of the function correctly...or even using the function correctly.

This is a snipbit of what I've been trying:


## read in my 1-column of values, each line is a different time step
ts.table <- read.table("timeseries.1d")
ts.values <- ts.table[,1]

## first calculate coefficients to pass to coefDeriv
ts.coef <- coefFit(ts.values)

d.ts <- coefDeriv(ts.coef)

However, when I try to look at d.ts$y.deriv, assumning that this will plot the derivative I want, all the numbers are huge (on the order of e+02 to e+08) when my original time series ranged from 0 to 970. Am I going about this the wrong way? Or are there other tools that would lead me to estimating the derivative of a time series?

Thanks in advance for any help!

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 13 22:33:26 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:03 EST