linear relation

2 messages 2 people Latest: Oct 13, 2010

linear relation

From: Hauke Rühs Date: October 13, 2010 technical
Dear NMusers, I currently building an indirect response model C1=A(1)/V1 DADT(2)=KIN-KOUT*INH*A(2) , where the KOUT is inhibited by INH=1-(SLOPE*C1). SLOPE should be estimated with variability. How can I make sure that INH stays between 0 and 1? I wrote it like this IF ((SLOPE*C1).GT.1) THEN INH=0 ENDIF IF ((SLOPE*C1).LT.0) THEN INH=1 ENDIF IF((SLOPE*C1).LE.1.AND.(SLOPE*C1).GE.0) THEN INH=1-SLOPE*C1 ENDIF , but I think it is not optimal to write it in conditions. Does anyone know a better way to write this? Thank you. ----------------------------- Hauke Rühs Apotheker Pharmazeutisches Institut - Klinische Pharmazie - An der Immenburg 4 53121 Bonn Tel: + 49-(0)228 73-5781 Fax: + 49-(0)228 73-9757 http://www.klinische-pharmazie.info/ www.klinische-pharmazie.info

Re: linear relation

From: Jun Shen Date: October 13, 2010 technical
Dear Hauke, I never tried this myself, but I think the following transformation should give you what you described INH=1-(exp(slope*C1)-1)/exp(slope*C1) Jun Shen Seventh Wave Labs
Quoted reply history
On Wed, Oct 13, 2010 at 10:30 AM, Hauke Rühs <[email protected]> wrote: > Dear NMusers, > > > > I currently building an indirect response model > > > > C1=A(1)/V1 > > DADT(2)=KIN-KOUT*INH*A(2) > > > > , where the KOUT is inhibited by INH=1-(SLOPE*C1). SLOPE should be > estimated with variability. How can I make sure that INH stays between 0 and > 1? > > > > I wrote it like this > > > > IF ((SLOPE*C1).GT.1) THEN > > INH=0 > > ENDIF > > > > IF ((SLOPE*C1).LT.0) THEN > > INH=1 > > ENDIF > > > > IF((SLOPE*C1).LE.1.AND.(SLOPE*C1).GE.0) THEN > > INH=1-SLOPE*C1 > > ENDIF > > > > , but I think it is not optimal to write it in conditions. Does anyone know > a better way to write this? > > > > Thank you. > > > > > > > > ----------------------------- > > Hauke Rühs > > Apotheker > > Pharmazeutisches Institut > > - Klinische Pharmazie - > > An der Immenburg 4 > > 53121 Bonn > > > > Tel: + 49-(0)228 73-5781 > > Fax: + 49-(0)228 73-9757 > > > > www.klinische-pharmazie.info > > > > >