1
$\begingroup$

I'm trying to fit a critical exponential function using nls. The function is of the form $y = a+ (b + cx)r^x$ and has a single maximum/minimum, a single inflection point and an asymptote.

I can sort of estimate starting values for the parameters from the data (eg the asymptote), and this works some of the times, but I'd like a more rigorous method to estimating the parameters prior to using nls.

I found a suggestion here, which uses expected-value parameters to estimate the parameters for an exponential curve. I tried to do something similar, but the extra parameter makes things complicated.

I also found a reparameterisation of the function which removes the c parameter by using expected-value parameter $$ y=[b(1-x/x_1)+(x/x_1)(y_1-a)/r^{x_1}]r^x+a $$ where y1 corresponds to $x=x_1$, but I can't figure out how to estimate the remaining parameters.

Any suggestions as to how to approach this would be appreciated!

Some test data:

xvals=c(30.0, 46.0, 62.0, 78.0, 94.0, 110.0, 126.0, 142.0, 158.0, 174.0, 190.0, 206.0, 222.0, 238.0, 254.0)
yvals=c(-0.42286827, -0.6666351, -0.38212553, 0.10617201, 0.88309403, 0.97816225, 0.7471844, 0.3668751, 0.09183945, 0.11818037, 0.18587128, 0.22363502, 0.32338324, 0.27689159, 0.32192359)

Thanks!

$\endgroup$
3
  • $\begingroup$ You will have severe problems, regardless of parameterization, because your data don't come anywhere close to being described by this class of curves. I would like to suggest you would be better served here by abandoning this particular question and telling us instead about your data and your analytical objective: what do you really want to find out? $\endgroup$
    – whuber
    Commented Feb 26, 2013 at 14:27
  • $\begingroup$ It looks to me like - with your elimination of $c$ - you basically have converted it to a Gompertz curve (though in your case the signs of parameters may flip it around in the $x$ and/or $y$ directions - such flipping isn't hard to deal with). I have a feeling there's a self-start function for that in one of the R packages, but in any case there are old papers that talk about ways to estimate starting values for that (no, sorry I don't have references to hand, but you can google as easily as I could; at least now there's a search term). $\endgroup$
    – Glen_b
    Commented Feb 27, 2013 at 0:12
  • $\begingroup$ I basically wanted to do something like this, where nonlinear models are used to describe gene expression profiles. I just randomly selected the example data since I thought it looked like the function in question. I'll have another, proper look at the data. Thanks for the suggestions. $\endgroup$
    – steiny
    Commented Feb 27, 2013 at 12:00

1 Answer 1

2
$\begingroup$

As I have stated many times, there is a simple, general method for solving these kinds of problems. It involves using the predicted observed values as parameters in the model, i.e one reparameterizes the model in terms of the predicted observed $y$'s. Note that the original parametrization is linear in the three parameters $a$, $b$, and $c$. For the predicted $y$'s we pick Y1, Ymid, and Yn as the parameters where the Ymid is the predicted value for the largest observed $y$, that is for the sixth observation. For the first phase of the estimation we fix these parameters and maximize for r.

phase 1 fit to data

Note how the curve goes through the three y values exactly.

In the second phase we maximize over all four parameters.

phase 2 fit to data

The parameter estimates together with their estimated standard deviations are (these are the original a,b,c,and r).

           value     std dev
 r      9.8813e-01 6.2881e-03
 a     -2.8590e-01 8.6950e-01
 b     -1.9750e+00 1.6021e+00
 c      4.3028e-02 1.5931e-02
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.