Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: RE: inflection point of sigmoid curves


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: inflection point of sigmoid curves
Date   Tue, 15 Jun 2010 12:32:24 -0400

Tony--
But the normal pdf is not sigmoid (the cdf is, and its inflection
point is at the mean, so if the function is given then no Stata
commands are required).  The poster was asking about an arbitrary
(apparently?) sigmoid curve; if you know the functional form, it is
easy to derive the inflection point with paper and pencil, which was
Nick's point.  I offered a pair of "silly" examples of computing
inflection points of y=f(x) for some unknown sigmoid f() by estimating
a cubic function x=g(y) and then computing the inflection point in
terms of y (called ybar).

The examples are silly because y is assumed measured without error in
the regression, which contradicts any other regressions you might
consider where y is a function of x. Also, a cubic has the right sort
of shape but may not fit a particular function well at all (the
tangent and atan functions spring to mind). There is also a mistake in
the code... one should use -predict- instead of interpolation to get
xbar, like so:

drawnorm x, mean(10) n(1000) clear
sort x
g y=(_n+1)/(_N+2)
reg x c.y##c.y##c.y
loc ybar=-2*_b[c.y#c.y]/(6*_b[c.y#c.y#c.y])
set obs `=_N+1'
replace y=`ybar' in l
predict px
loc xbar=px[_N]
lpoly y x, nosc xli(`xbar')

webuse nhanes2, clear
ren  bpsystol y
ren age x
reg x c.y##c.y##c.y
loc ybar=-2*_b[c.y#c.y]/(6*_b[c.y#c.y#c.y])
set obs `=_N+1'
replace y=`ybar' in l
predict px
loc xbar=px[_N]
lpoly y x, nosc xli(`xbar')
tw function -12+_b[c.y]*x+_b[c.y#c.y]*x^2+_b[c.y#c.y#c.y]*x^3, ra(-200
300) || sc y x,  xli(`xbar')

On Tue, Jun 15, 2010 at 11:53 AM, Lachenbruch, Peter
<Peter.Lachenbruch@oregonstate.edu> wrote:
> If you wish the inflection point of a normal curve you can take the second derivative of a normal density and find the inflection points are at mu+sigma and mu-sigma.
>
> Tony
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index