Re: if-the-statement for 3 class categorical covariate
Hi Bernard,
There are many ways to code it. Another way to code is:
GENE1=0
GENE2=0
GENE3=0
IF (GENE.EQ.1.OR.GENE.EQ.4) GENE1=1 ; TT/missing
IF (GENE.EQ.2) GENE2=1 ; GT
IF (GENE.EQ.3) GENE3=1 ; GG
CL = THETA(1)*GENE1*EXP(ETA(1)) +
THETA(2)*GENE2*EXP(ETA(2)) +
THETA(3)*GENE3*EXP(ETA(3))
Best
Mukul Minocha
University of Maryland Baltimore
Quoted reply history
On Thu, Jul 25, 2013 at 10:08 AM, Bernard Ngara <[email protected]>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
> --
> Bernard Ngara
> Trainee Biostatistician
> Africa Institute of Biomedical Science and Technology
> P. O Box 2294
> Harare
> Zimbabwe
> +263 772 160 896
>
--
-Mukul