p.s. My suggestion is a special case of Duncan Murdoch's suggestion: If you have a model that should fit the data, use it. If you don't -- or if you have only something rather general -- then the more general tools of functional data analysis may be useful.

######################
There is a strong argument for fitting something like splines and then differentiating the spline fit.


I trust you won't object to my immodest recommendation of the "fda" package and book by Ramsay, Hooker and Graves (2009) Functional Data Analysis with R and Matlab (Springer). The "fda" package includes scripts to work all but one of the 76 examples in the book.


      Hope this helps.
      Spencer Graves


On 8/30/2010 4:13 PM, Duncan Murdoch wrote:
On 30/08/2010 6:40 PM, [email protected] wrote:
Dear all,

I was asked to send the following question:

We have some (raw) observations and would like to get the first and
second
derivatives in R. Any comment would be appreciated.

Fit a model, and take derivatives of the fit.  Which model?  Depends
on the context.

Duncan Murdoch

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to