# [R] Non-Linear Regression Problem

Sundar Dorai-Raj sundar.dorai-raj at PDF.COM
Fri Apr 16 15:40:59 CEST 2004

```
WilDscOp wrote:

> Dear all,
>
> First of all i like to thank specially Spencer Graves and Douglas Bates
> for their kind help and suggestions. I estimated the parameter nicely.
>
> But, for my previous posted problem, the rational of the following line
>  R> fit0 <- lm(log(Y)~t-1, draper.data)
> is not clear to me. How come this gives the initial value?
>
> Any response / help / comment / suggestion / idea / web-link / replies
> will be greatly appreciated.
>
>

I don't recall your previous post, but my guess is that you're trying to
solve

Y = exp(A * t)

Taking the log of both sides gives

log(Y) = A * t

This a linear model with no intercept. To fit this in R, use -1 in the
formula to drop the intercept.

Ahat <- coef(lm(log(Y) ~ t - 1))

Note, I would not use "t" as a variable name, since it is also a
function in the base package (transpose of a matrix). Most of the time R
can make the distinction, but why chance it?

HTH,

--sundar

```