Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20090227T162209-350@post.gmane.org>
Date: 2009-02-27T16:25:36Z
From: Dieter Menne
Subject: formula formatting/grammar for regression

Brigid Mooney <bkmooney <at> gmail.com> writes:

> I am doing some basic regression analysis, and am getting a bit
> confused on how to enter non-polynomial formulas to be used.
..
> But am confused on what the formula should be for trying to find a fit
> to y = A*exp(r*x).

If this example is just a placeholder for "more complex than poly",
you should check function nls which works for non-linear functions.

However, if you really want to solve this problem only, doing a 
log on you data and fitting a log of the above function with lm()
is the easiest way out. Results can be a bit different from the
nonlinear case depending on noise, because in one case weight
are log-weighted, in the other linearly.

Dieter