Message-ID: <6ade6f6c0904150637q5f541e4bhe4e90347c612f2bf@mail.gmail.com>
Date: 2009-04-15T13:37:55Z
From: Paul Smith
Subject: nls factor
In-Reply-To: <6ade6f6c0904150633n427db33x2e82f92929f425b@mail.gmail.com>
On Wed, Apr 15, 2009 at 2:33 PM, Paul Smith <phhs80 at gmail.com> wrote:
> On Wed, Apr 15, 2009 at 1:27 PM, Manuel Gutierrez
> <manuelgutierrezlopez at gmail.com> wrote:
>> I want to fit the model y=a*x^b using nls; where "a" should be different for
>> each level of a factor.
>> What is the easiest way to fit it? Can i do it with nls?
>> I've looked the help pages and the MASS example in page 249 but the formula
>> is different and I don't know how to specify it for my model.
>
> What about linearizing the model with log() and use lm() afterwards?
Oops, sorry, I misread your post -- 'a' changes with the level of a factor.
Paul