Re: if-the-statement for 3 class categorical covariate

From: Leonid Gibiansky Date: July 25, 2013 technical Source: mail-archive.com
It is not a good idea to use enclosed IF loops. Use CODE1=0 IF(GENE.EQ.1) CODE1=1 .... CODE4=0 IF(GENE.EQ.4) CODE4=1 CL=(CODE1*THETA(1)+...+CODE4*THETA(4))*EXP(ETA(1)) Leonid -------------------------------------- Leonid Gibiansky, Ph.D. President, QuantPharm LLC web: www.quantpharm.com e-mail: LGibiansky at quantpharm.com tel: (301) 767 5566
Quoted reply history
On 7/25/2013 10:08 AM, Bernard Ngara wrote: > Dear all > > I am shoked because NONMEM sents a crash message when i factor in > covariate modeling using a 4 class categorical variable genotype: > IF (GENE.EQ.3) THEN ;GG > CL = THETA(1)* EXP(ETA(1)) > ELSE IF (GENE.EQ.2)THEN ;GT > CL = THETA(6)* EXP(ETA(3)) > IF (GENE.EQ.1) THEN ;TT > CL = THETA(7)* EXP(ETA(4)) > IF (GENE.EQ.4) THEN ;MISSING > CL = THETA(7)* EXP(ETA(4)) > END IF > However if i binarize the code, nonmem runs successfully > IF (GENE.EQ.3) THEN > CL = THETA(1)* EXP(ETA(1)) > ELSE > CL = THETA(6)* EXP(ETA(3)) > > END IF > > Thanks in advance
Jul 25, 2013 Bernard Ngara if-the-statement for 3 class categorical covariate
Jul 25, 2013 Bill Denney RE: if-the-statement for 3 class categorical covariate
Jul 25, 2013 Nick Holford Re: if-the-statement for 3 class categorical covariate
Jul 25, 2013 Mukul Minocha Re: if-the-statement for 3 class categorical covariate
Jul 25, 2013 Leonid Gibiansky Re: if-the-statement for 3 class categorical covariate
Jul 25, 2013 Mario Gonzalez RE: if-the-statement for 3 class categorical covariate