s-news
[Top] [All Lists]

Re: numerical Derivative

To: s-news@wubios.wustl.edu
Subject: Re: numerical Derivative
From: Tim Hesterberg <timh@insightful.com>
Date: 14 Sep 2005 12:18:39 -0700
"yiwu ye" <yiwu21111958@yahoo.com> wrote:
>I have a pair of data x and y, which have a curve
>relationship. How can I caculate the derivative of y
>against x at a certain point of x without knowing the
>function using S+? Any help is highly appreciated.

Is there noise in the data or not?  Do you want to smooth or interpolate?

There are a variety of smoothers in S-PLUS; the predict() method
for smooth.spline() allows derivatives, I'm not sure about others such
as loess, lowess, supsmu, ksmooth.

For interpolation, the version of spline() in library(resample)
allows derivatives.

You might also use the S+FunctionalData library, but that is probably 
overkill.

resample and FunctionalData are available from
        www.insightful.com/downloads/libraries

Tim Hesterberg

========================================================
| Tim Hesterberg       Research Scientist              |
| timh@insightful.com  Insightful Corp.                |
| (206)802-2319        1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax)  Seattle, WA 98109-3012, U.S.A.  |
|                      www.insightful.com/Hesterberg   |
========================================================
Insightful 2005 User Conference
Princeton, NJ, Oct. 26-27, 2005
Don't miss the keynote by Dr. Bill Meeker!
Special Pricing: $199 Commercial/$99 Academic
www.insightful.com/news_events/2005uc


<Prev in Thread] Current Thread [Next in Thread>