Re: [R] Fitting a curve to to an oscillating scatter . .

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] Fitting a curve to to an oscillating scatter . .
From: Prof Brian D Ripley (ripley@stats.ox.ac.uk)
Date: Mon 14 Aug 2000 - 16:21:32 EST


Message-ID: <Pine.GSO.4.05.10008140719350.2817-100000@auk.stats>

On Sun, 13 Aug 2000, reza shahidzadeh mahani wrote:

> You can get the lower frequency component nonparametrically by
> increasing the bandwidth (in kernel smoothing with ksmooth in S) or
> increasing penalty coefficient (in spline smoothing with smooth.spline in
> S).
> I don't know the corresponding function in R unfrotunately.

The same. But that is not what he asked for, and I was trying to answer the
actual question.

In scatter.smooth one uses `span' to set the amount of smoothing.

>
> method) On Sun, 13 Aug 2000, Prof Brian D Ripley wrote:
>
> > On Sun, 13 Aug 2000, Phil Rhoades wrote:
> >
> > > I have just got going with R and think it is really nice however, as far as
> > > I can see, it can't do what I got it for:
> >
> > Sure it can. It is a fully fledging computing language.
> >
> > > I have some output from a computer simulation of mutating genes represented
> > > by a biological statistic - so the graph looks roughly like the top of:
> > >
> > > x = y^2
> > >
> > > - with oscillations around the general curve.
> > >
> > > If I use scatter.smooth() I get a nice curve representing the oscillations
> > > but what the curve I want to fit is the more basic curve ie the top arm of
> > > the x = y^2.
> > >
> > > Any suggestions?
> >
> > plot(x, y)
> > fit <- lm(y ~ I(x^0.5)) # or y ~ sqrt(x)
> > lines(predict(fit), sort(x))
> >
> > if indeed the response is y to stimulus x.
> >
> >
> > --
> > Brian D. Ripley, ripley@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
> >
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> >
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:19 EST