[R] nls fit to exponential decay with unknown time origin
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Fri Dec 14 20:23:17 CET 2001
"Robert D. Merithew" <merithew at ccmr.cornell.edu> writes:
> I'm trying to use nls() to fit an exponential decay with an unknown offset
> in the time (independent variable). (Perhaps this is inherently very
> difficult?).
>
>
> > decay.pl <- nls (amp ~ expn(b0,b1,tau,t0,t), data = decay,
> + start = c(b0=1, b1=7.5, tau=3.5, t0=0.1), trace=T)
> Error in nlsModel(formula, mf, start) : singular gradient matrix at
> initial parameter estimates
> >
> > expn(1, 7.5, 3.5, 0.1, decay$t)
> [1] 6.636080 5.259657 4.164661 2.797383 1.760584 1.250300
> attr(,"gradient")
> b0 b1 tau t0
> [1,] 1 0.75147729 -0.4600881 1.61030849
> [2,] 1 0.56795432 -0.6884997 1.21704497
> [3,] 1 0.42195477 -0.7801858 0.90418880
> [4,] 1 0.23965104 -0.7336256 0.51353794
> [5,] 1 0.10141123 -0.4973290 0.21730978
> [6,] 1 0.03337327 -0.2431481 0.07151415
> >
>
>
> Is the gradient matrix really singular? It works without the t0
> parameter.
>
Yes. b1 and t0 are not simultaneously identifiable. Shifting an
exponential curve in time is the same as multiplying by a constant.
Try calculating the ratio of the t0 and b1 columns above.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list