[R] French Curve

Martin Maechler maechler at stat.math.ethz.ch
Wed Apr 6 08:48:49 CEST 2005


>>>>> "Michael" == Michael A Miller <mmiller3 at iupui.edu>
>>>>>     on Tue, 05 Apr 2005 10:28:21 -0500 writes:

>>>>> "dream" == dream home <dreamhouse at gmail.com> writes:
    >> Does it sound like spline work do the job? It would be
    >> hard to persuave him to use some modern math technique
    >> but he did ask me to help him implement the French Curve
    >> so he can do his work in Excel, rather than PAPER.

    Michael> Splines are useful for interpolating points with a
    Michael> continuous curve that passes through, or near, the
    Michael> points.

not only!  (see below)

    Michael> If you are looking for a way to estimate a
    Michael> curve with a noise component removed, I think you'd
    Michael> be better off filtering your data, rather than
    Michael> interpolating with a spline.  

yes  for  "rather than interpolating"
no   for  "with a spline"

There's the  smooth.spline()   *smoothing* spline function (with
predict() methods, even for 1st and 2nd derivatives) which is
liked by `many' and even prefered to other ``filters'' for
diverse reasons, notably for the fact that spline smoothing
corresponds to linear "filtering" with a curvature-adaptive
varying bandwith.

    Michael> Median (or mean) filtering may give results
    Michael> similar to those from your chemist's manual method.
    Michael> That is easy to do with running from the gtools
    Michael> package.  The validity of this is another question!

Median filtering aka "running medians" has one distinctive
advantage {over smooth.spline() or other so called linear smoothers}:
   It is "robust" i.e. not distorted by gross outliers.
Running medians is implemented in runmed() {standard "stats" package}
in a particularly optimized way rather than using the more general
running(.) approach of package 'gtools'.

Martin Maechler, ETH Zurich




More information about the R-help mailing list