While this doesn't answer your question, I want to let you know that there
is a proposal for a related improvement within R that will let users compute
(numerically) the derivatives, of any order, of a given function inside of
R. In your case, this means that you will write the smooth spline function,
symbolically f(x), that will interpolate between the points. Using Automatic
Differentiation, the proposed solution, will automatically let you find
f'(x), f''(x), etc.. by using the same function but overloading the meaning
of the arithmetic operators and mathematical functions to act upon a special
data type.

The initial idea
<http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010:adinr>came
from Prof. John Nash who suggested bringing the ability of Automatic
Differentiation to R. We both have, since, collaborated to bring out
adetailed proposal<http://socghop.appspot.com/gsoc/student_proposal/show/google/gsoc2010/quantumelixir/t126989852709>outlining
the various features to be implemented.

Note that, this is being planned to be implemented as part of Google's
Summer of Code program for this year. So, should our proposal be selected,
much more than simple second derivative computation can be accomplished from
within R.

Regards,
Chillu

On Fri, Apr 2, 2010 at 2:06 PM, FMH <kagba2006@yahoo.com> wrote:

>
> Dear All,
>
> I've been searching for appropriate codes to compute the rate of change and
> the curvature of  nonparametric regression model whish was denoted by a
> smooth function but unfortunately don't manage to do it. I presume that such
> characteristics from a smooth curve can be determined by the first and
> second derivative operators.
>
> The following are the example of fitting a nonparametric regression model
> via smoothing spline function from the Help file in R.
>
> #######################################################
> attach(cars)
> plot(speed, dist, main = "data(cars)  &  smoothing splines")
> cars.spl <- smooth.spline(speed, dist)
> lines(cars.spl, col = "blue")
> lines(smooth.spline(speed, dist, df=10), lty=2, col = "red")
> legend(5,120,c(paste("default [C.V.] => df =",round(cars.spl$df,1)),"s( * ,
> df = 10)"), col = c("blue","red"), lty = 1:2, bg='bisque')
> detach()
>
> #######################################################
>
>
> Could someone please advice me the appropriate way to determine such
> derivatives on the curves which were fitted by the function above and would
> like to thank you in advance.
>
> Cheers
> Fir
>
>
>
>
>
> ______________________________________________
> R-help@r-project.org 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.
>

	[[alternative HTML version deleted]]

