Statalist The Stata Listserver


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

Re: st: finding a peak in an asymmetric curve


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: finding a peak in an asymmetric curve
Date   Tue, 11 Apr 2006 20:25:38 +0900

Yoshiro Nagao wrote:

I am very sorry for pasting
a large number of records.

(x, y) in the pasted dataset
rises very sharply but declines
slowly.

Are there any statistical method
to find the value of x for the peak,
and show its "significance"?

(x, y):
such as
(nutrient, longevity),..

x        y
0.001 51.50260873
[redacted]
0.049458 255.6028341

--------------------------------------------------------------------------------

If you know the functional form, then you can set it up using -nl-, get the
fit, differentiate and solve for nutrient value at the inflection.  The old
pharmacokinetics standby (below) seems to do okay for your example, but
looking the functional form up in a nutrition/longevity-specific biology
reference book will be better for real use.

If a functional form isn't known to biology, then you can use splines
(-findit spline-), get a fit, and go from there.  Or even resort to what
pharmacokineticists do (see below) for "Tmax (observed)."

I'm not sure what you mean by "show its 'significance'."  Do you mean
construct a confidence interval?  Then maybe use the bootstrap on the Tmax
values by whichever method obtained.

Joseph Coveney

clear
set more off
input nutrient longevity
0.001 51.50260873
[redacted--fill in from the original post]
0.049458 255.6028341
end
nl (longevity = {alpha}*exp({beta}*nutrient) + ///
  {gamma}*exp({delta}*nutrient)), nolog
predict longevity_hat */
twoway (line longevity_hat nutrient, ///
  sort lcolor(black)) ///
  (scatter longevity nutrient, sort ///
  msymbol(circle) mcolor(black) mfcolor(white) ///
  msize(medlarge)), ///
  ytitle(Theoretical Longevity (h)) ///
  ylabel(, angle(horizontal)) ///
  xtitle(Initial Nutrient Concentration (mM)) ///
  xlabel(, format(%4.2f)) ///
  legend(off) ///
  scheme(s1mono) ///
  graphregion(fcolor(white) lcolor(white) ///
  ifcolor(white) ilcolor(white)) ///
  plotregion(fcolor(white) lcolor(white) ///
  ifcolor(white) ilcolor(white))
* Analytical solution
display in smcl as result 1 / (-_b[/delta] + _b[/beta]) * ///
   ln(_b[/delta] / _b[/beta])
* Tmax (observed)
egen longevity_max = max(longevity)
list nutrient if longevity == longevity_max
exit

*
*   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/



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