s-news
[Top] [All Lists]

Re: Understanding Self Start Function for Asymptotic

To: jrausch@nd.edu
Subject: Re: Understanding Self Start Function for Asymptotic
From: Douglas Bates <bates@stat.wisc.edu>
Date: 21 Feb 2004 11:27:11 -0600
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <1076370844.40281d9d000a4@webmail.nd.edu>
References: <1076370844.40281d9d000a4@webmail.nd.edu>
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)
jrausch@nd.edu writes:

> Regarding my first question, 
> 
> I would like to thank Bert Gunter, Sam Buttrey, Scott Chasalow, and Patrick
> Burns, all who alerted me to the fact that I need to call upon
> "NLSstRtAsymptote.sortedXyData" to determine the algorithm for the
> NLSstRtAsymptote() function.
> 
> With respect to the second question (which can be found at the bottom of this
> email) regarding the nls.control() option when using the SSasymp self-start
> function within nls(), I would greatly appreciate any leads/suggestions for
> determining the answer to this. 

If you want to have complete control you can avoid the selfStart
function entirely and determine your own starting estimates for the
parameters.  Because the asymptotic regression model has two
conditionally linear parameters and only one nonlinear parameters, you
only need to specify one starting estimate (the rate constant) if you
use algorithm = "plinear" in a call to nls.  As the model only makes
sense for positive rate constants we use the logarithm of the rate
constant (lrc).

That's exactly what is occuring when you get the error message

Error in nls(y ~ cbind(1 - exp(-exp(lrc) * x), exp(-exp(lrc) * x)), data = 
xy,  : step factor 0.000488281 reduced below `minFactor' of 0.000976563

If that optimization fails then changing the minimum step factor won't
help you.  Failure of this one-parameter optimization indicates that
for some reason your data cannot be fit by the model.  I suggest that
you plot your data and look at them carefully.  If, for example, your
data are exactly linear, then you won't be able to fit the asymptotic
regression model.

You can perform an equivalent optimization, including a trace of the
optimization steps, using

nls(Y ~ cbind(1, exp(-exp(lrc) * x)), start = c(lrc = -0.1), alg =
"plinear", trace = TRUE)

Look to see what the values of lrc are doing.  If they are going to
negative infinity then you are not going to be able to fit this model
to these data.

-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/

<Prev in Thread] Current Thread [Next in Thread>