Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Gompertz equation


From   Michael Begg <[email protected]>
To   [email protected]
Subject   Re: st: Gompertz equation
Date   Fri, 25 Mar 2011 10:11:49 +1100

Thanks Nick, it seems that specifying a sensible initial value for b1
along with your scale suggestion allows Stata to estimate the
parameters as intended.

Cheers



On Wed, Mar 23, 2011 at 9:39 PM, Nick Cox <[email protected]> wrote:
> Fitting models with -nl- can be tricky even when the model and the
> data are well matched. I've found that giving reasonable initial
> values can make all the difference between an excellent fit and no fit
> at all. In your case I'd worry about the numerics of exp(exp()) and
> scale so that x and y were  say of order 1 rather than something much
> bigger or smaller.
>
> I note that your syntax as stated wouldn't work without {} around parameters.
>
> Nick
>
> On Wed, Mar 23, 2011 at 12:24 AM, Michael Begg <[email protected]> wrote:
>
>> I am trying to estimate the equation y = b1*exp(b2*exp(b3*x)) using the
>> following:
>>
>> nl (y = b1*exp(b2*exp(b3*x)))
>>
>> Stata takes b3 as a constant and b2 is omitted.
>>
>> Why is this happening?
>>
>> If I use the inbuilt gompertz function form y = b1*exp(-exp*(b2*(b3 - x)))
>> using
>>
>> nl gom3: y x
>>
>> it works fine.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index