[R] help: exponential fit?

Douglas Bates
2001-05-23T12:51:00Z

L?dde Mirko <mirko.luedde at cellcontrol.de> writes:

> I'm quite new to R (and statistics),
> and I like it (both)!
> But I'm a bit lost in all these packages,
> so could someone please give me a hint
> whether there exists a package for fitting
> exponential curves (of the type
> t --> \sum_i a_i \exp( - b_i t))
> on a noisy signal?
> In fact monoexponential decay + polynomial growth
> is what I'd like to try.

See the example for the biexponential model, SSbiexp, in the nls
package for a start.

> example(SSbiexp, package = "nls")

SSbixp> data(Indometh)

SSbixp> Indo.1 <- Indometh[Indometh$Subject == 1, ]

SSbixp> fm1 <- nls(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2),
    data = Indo.1)

SSbixp> summary(fm1)

Formula: conc ~ SSbiexp(time, A1, lrc1, A2, lrc2)

Parameters:
     Estimate Std. Error t value Pr(>|t|)
A1     2.0293     0.1099  18.464 3.39e-07 ***
lrc1   0.5794     0.1247   4.648  0.00235 **
A2     0.1915     0.1106   1.731  0.12698
lrc2  -1.7878     0.7871  -2.271  0.05737 .
---
Signif. codes:  0  `***'  0.001  `**'  0.01  `*'  0.05  `.'  0.1
` '  1

Residual standard error: 0.04103 on 7 degrees of freedom

Correlation of Parameter Estimates:
            A1   lrc1    A2
lrc1  0.002546
A2   -0.424384 0.8771
lrc2 -0.455538 0.7708 0.939