[R] Question about curve fitting...

Berton Gunter gunter.berton at gene.com
Wed Aug 10 17:01:24 CEST 2005


As you appeared to have received no reply ...

1) Use nls() on the original equation

2) Transforming first and using linear fitting is **NOT** the same. The
error structures differ and therefore you get different results. The
greatest effect is on inferences -- i.e confidence intervals for the
parameters: the usual asymptotic intervals would be symmetric based on the
original scale, asymmetric based on the transformed. For reasonably
well-behaved data the point estimates shouldn't be too much different,
however. In any case, the linearization is a good way to find starting
values.


-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of S.O. Nyangoma
> Sent: Wednesday, August 10, 2005 3:22 AM
> To: Dan Bolser
> Cc: R mailing list
> Subject: Re: [R] Question about curve fitting...
> 
> I see that 
> log(y)=log(k1)+k2*log(x)
> use lm?
> 
> ----- Original Message -----
> From: Dan Bolser <dmb at mrc-dunn.cam.ac.uk>
> Date: Wednesday, August 10, 2005 11:41 am
> Subject: [R] Question about curve fitting...
> 
> > 
> > Meta:
> > This question is somewhat long and has two parts, I would be very 
> > happyfor someone just to nudge me in the right direction with the 
> > manual /
> > tutorial, as I am somewhat lost...
> > 
> > 
> > 1) How do I fit a curve of the form "y = k1 * x^k2" ?
> > 
> > I want to estimate values of k1 and k2 given the x/y data I have, 
> > and I
> > can't work out how to get R to calculate and return their estimates.
> > 
> > 
> > 2) Given the value of k1 and k2 for population A, how can I test if
> > population B has significantly different values of k1 and k2?
> > 
> > Sorry for the basic question. I think I just need to read 
> up on a few
> > functions.
> > 
> > 
> > I have about 50 xy pairs in total if that makes a difference.
> > 
> > Dan.
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! http://www.R-project.org/posting-
> > guide.html
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list