Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.WNT.4.44.0212061536020.3124-100000@petrel>
Date: 2002-12-06T16:40:04Z
From: Brian Ripley
Subject: smooth curves
In-Reply-To: <87d6ofp7ek.fsf@lumen.indyrad.iupui.edu>

On 6 Dec 2002, Michael A. Miller wrote:

> >>>>> "guerreau" == guerreau  <alain.guerreau at fnac.net> writes:
>
>     > I would like to draw smooth curves instead of polygons.  I
>     > could not find any spline function to do that : given an x
>     > and a y vectors, they all take the x in increasing order.
>     > Is there a function to draw a smooth curve through a set of
>     > points in any order ?
>
> The locfit package local regression, likelihood and density
> estimation) can be used to that:
>
> library(locfit)
> data(ethanol)
> fit <- locfit(NOx~E,data=ethanol)
> plot(NOx~E,data=ethanol)
> lines(fit)

1) That package is in CRAN/Devel because it does not work (fully) with
current R.

2) Your example is of a *smoothed* fit, not of a smooth interpolating
curve.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595