[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Austin Nichols" <austinnichols@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: nl -choice between alternative parametrisations of sigmoid models |

Date |
Fri, 26 Oct 2007 10:10:49 -0400 |

You can viewsource nllog4.ado but I'm backing off my notion that you should reparametrize. If the two forms produce the same shaped curve, you can convert the estimated parameters into the form you want, right? Then plug those into another call to -nl- as -initial- values, and the model should converge in one. On 10/26/07, Rosy Reynolds <rr@dandr.demon.co.uk> wrote: > Austin, > Many thanks for the thought, and a neat trick. I could do as you suggest, > but as that would be a 'home-grown' rather than a built-in function, I would > have to take responsibility for choosing the starting values myself. The > built-in -log4- function does something very neat about selecting starting > values, and I appreciate that. (When I started out, I experimented with > fitting the log4 > model by typing it in myself like this > nl ( y1= {b0} + {b1}/(1 + exp(-{b2}*(x-{b3}))) ) > It kept producing crazy results with a lot of dots in the tables, or failing > to converge at all, and it took me a while to work out that it was not a > mistake in my syntax but a need for good starting values.) > I would be interested to see how -log4- does pick its starting values, but I > haven't found the code for it. -viewsource nl.ado- brings up the code for > nl, but nothing to link up with the built-in functions. Do you have any idea > where I could find the code for them? > best wishes > Rosy > > > ----- Original Message ----- > From: "Austin Nichols" <austinnichols@gmail.com> > To: <statalist@hsphsun2.harvard.edu> > Sent: Thursday, October 25, 2007 5:03 PM > Subject: Re: st: nl -choice between alternative parametrisations of sigmoid > models > > > > Rosy-- > > I haven't used -nl- in a while, but it seems to me that a model like > > y= b0 + b1/(1 + exp(-b2*(x-b3))) +error > > where b2>0 can be written > > y= b0 + b1/(1 + exp(-b^2*(x-b3))) +error > > with new parameter b, and b2=b^2 has to be positive. > > > > On 10/25/07, Rosy Reynolds <rr@dandr.demon.co.uk> wrote: > >> Hello, > >> I am fitting 4-parameter logistic (sigmoid Emax) dose-response models > >> using > >> the built-in -log4- feature of -nl-. > >> > >> The model is y= b0 + b1/(1 + exp(-b2*(x-b3))) + error > >> and the coefficients can be interpreted as > >> b0 = baseline outcome > >> b1 = Emax i.e. largest change from baseline > >> b2 = Hill or slope coefficient > >> b3 = ED50 i.e. value of x (dose) required to produce half-maximal effect, > >> > >> The same curve can actually be produced with two different sets of these > >> parameters. > >> In one set, the Hill slope b2 is positive and the other parameters > >> intuitively have the interpretations above. > >> In the other set, b2 is negative, the sign of b1 is reversed, and b0 > >> becomes > >> the outcome at infinitely high dose instead of at the lowest doses. The > >> lowest-dose outcome is now given by b0+b1. > >> > >> With our data, -nl- naturally produces the set of coefficients with > >> negative > >> b2. > >> For ease of interpretation, I would prefer the set with positive b2. > >> I can push -nl- into doing that by supplying carefully chosen starting > >> values close to the desired coefficients. I could even run -nl- , > >> manipulate > >> the coefficients it obtains, and use those as starting values. That would > >> always work, I suppose, but it seems long-winded. > >> > >> Please could you tell me an easier way to make -nl- parametrise the model > >> in > >> the preferred way, if you know of one? I haven't found anything about it > >> in > >> the manual. > >> Thanks for thinking about this. > >> > >> best wishes > >> Rosy Reynolds > >> BSAC Resistance Surveillance Co-ordinator > >> www.bsacsurv.org > > * > > * For searches and help try: > > * http://www.stata.com/support/faqs/res/findit.html > > * http://www.stata.com/support/statalist/faq > > * http://www.ats.ucla.edu/stat/stata/ > > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: nl -choice between alternative parametrisations of sigmoid models***From:*"Rosy Reynolds" <rr@dandr.demon.co.uk>

**Re: st: nl -choice between alternative parametrisations of sigmoid models***From:*"Austin Nichols" <austinnichols@gmail.com>

**Re: st: nl -choice between alternative parametrisations of sigmoid models***From:*"Rosy Reynolds" <rr@dandr.demon.co.uk>

- Prev by Date:
**Re: st: pweights in summarize / describe / codebook** - Next by Date:
**Re: st: ARTSURV** - Previous by thread:
**Re: st: nl -choice between alternative parametrisations of sigmoid models** - Next by thread:
**Re: st: nl -choice between alternative parametrisations of sigmoid models** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |