The multiple exponential problem you are attempting has a well-known and long 
history.
Lanczos 1956 book showed that changing the 4th decimal in a data set changes the
parameters hugely.

Nevertheless, if you just need a "fit" and not reliable paramters, you could
reparameterize to k1 and k2diff=k2-k1, so k2=k1+kdiff. Then kdiff has a lower 
bound of 0,
though putting 0 will almost certainly get you into computational trouble. You 
probably
want an upper bound on k1 too. The problem is discussed in the book I published 
with Mary
Walker-Smith in 1987, but I think our treatment is still only an expedient. 
Note that the
software was in BASIC, but it still runs (DOSBOX is a friend for Linux users). 
That book
can be obtained free from  http://macnash.telfer.uottawa.ca/nlpe/.

Best, JN



On 11/18/2011 06:00 AM, r-help-requ...@r-project.org wrote:
> Message: 4
> Date: Thu, 17 Nov 2011 20:42:12 +0800
> From: Jinsong Zhao <jsz...@yeah.net>
> To: "r-help@r-project.org" <r-help@r-project.org>
> Subject: [R] how to define the bound between parameters in nls()
> Message-ID: <4ec50124....@yeah.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi there,
> 
> I have read the help page of nls(), there is lower or upper for defining 
> the bounds of parameters. For example,
> 
> nls(y ~ 1-a*exp(-k1*x)-(1-a)*exp(-k2*x), data=data.1, start=list(a=0.02, 
> k1=0.01, k2=0.0004), upper=c(1,1,1), lower=c(0,0,0))
> 
> I hope to define k1 > k2, but I don't find a way.
> 
> Any suggestions will be really appreciated.
> 
> Regards,
> Jinsong
> 
> 
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to