Re: [R] Question about curve fitting...

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 11 Aug 2005 - 01:01:43 EST

Dan Bolser <dmb@mrc-dunn.cam.ac.uk> writes:

> On Wed, 10 Aug 2005, S.O. Nyangoma wrote:
>
> >I see that
> >log(y)=log(k1)+k2*log(x)
> >use lm?
>
> Thats a nice solution in this instance, but in general how do I get R to
> fit a particular function (formula) and return the parameters?

nls() is your friend.  

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@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
Received on Thu Aug 11 01:06:15 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:12:53 EST