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

From: S.O. Nyangoma <S.O.Nyangoma_at_amc.uva.nl>
Date: Wed 10 Aug 2005 - 20:21:33 EST

I see that
log(y)=log(k1)+k2*log(x)
use lm?

>
> 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@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help