Statalist


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

st: reverse prediction - confidence interval for x at given y in nonlinear model


From   "Rosy Reynolds" <rr@dandr.demon.co.uk>
To   "statalist" <statalist@hsphsun2.harvard.edu>
Subject   st: reverse prediction - confidence interval for x at given y in nonlinear model
Date   Thu, 25 Oct 2007 10:50:50 +0100

Dear Statalist,
Sigmoid models are customary in pharmacodynamics (dose-response studies).
According to custom, I am using a 4-parameter logistic (sigmoid Emax) model. This is very easily done with -nl- as Stata has this model already built in.

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, that is x required for y=b0 + b1 / 2

As the ED50 is a parameter of the model, -nl- reports it with a standard error and confidence interval.
What I would like to do is obtain estimates with standard errors and confidence intervals for other similar measures e.g. the ED90, the dose required for 90% of maximal effect.
In general, how could I calculate an estimate and confidence interval for the x required to achieve any given value of y?
I will be grateful for any guidance anyone can give me.
I hope I'm not missing something very obvious.

best wishes
Rosy Reynolds
BSAC Resistance Surveillance Co-ordinator
www.bsacsurv.org

Below are simulated data and output from -nl- .
In this case, by design, half maximal effect is at y=6, and the ED50 value of x to produce that is 5.
-nl- estimates the ED50 (b3) nicely as 4.9 with CI [4.7, 5.1]
I would like to obtain an estimate of x for y=9, for example, with a CI.

* Simulate data with fairly small errors.
. clear
. set obs 101
obs was 0, now 101
. gen x=(_n-1)/10
. local b0 2 // Yo
. local b1 8 // Emax
. local b2 1 // Hill coefficient
. local b3 5 // ED50
. gen y= `b0' + `b1'/(1 + exp(-`b2'*(x-`b3'))) + 0.5*invnormal(uniform())

*Fit model
. nl log4: y x // Stata built-in 4-parameter logistic
(obs = 101)

Iteration 0: residual SS = 37.0629
Iteration 1: residual SS = 25.18804
Iteration 2: residual SS = 22.87
Iteration 3: residual SS = 22.86999
Iteration 4: residual SS = 22.86999
Iteration 5: residual SS = 22.86999

Source | SS df MS
-------------+------------------------------ Number of obs = 101
Model | 1019.30494 3 339.768313 R-squared = 0.9781
Residual | 22.8699928 97 .235773122 Adj R-squared = 0.9774
-------------+------------------------------ Root MSE = .4855647
Total | 1042.17493 100 10.4217493 Res. dev. = 136.6108

4-parameter logistic function, y = b0 + b1/(1 + exp(-b2*(x - b3)))
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/b0 | 1.853862 .1387566 13.36 0.000 1.578469 2.129256
/b1 | 8.259274 .2210395 37.37 0.000 7.820572 8.697977
/b2 | .9559409 .0661914 14.44 0.000 .8245693 1.087312
/b3 | 4.879619 .0739367 66.00 0.000 4.732876 5.026363
------------------------------------------------------------------------------
Parameter b0 taken as constant term in model & ANOVA table

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index