190 likes | 369 Views
Within Subject Random Effect Transformations with NONMEM VI. B. Frame 9/11/2009. Dynamic Transform Both Sides (TBS). What is TBS? Why bother with TBS? Brief History, Jacobians, and Likelihoods . Implementation and examples in NONMEM (V or VI). What is Transform Both Sides (TBS)?.
E N D
Within Subject Random Effect Transformations with NONMEMVI B. Frame 9/11/2009 Wolverine Pharmacometrics Corporation
Dynamic Transform Both Sides (TBS) • What is TBS? • Why bother with TBS? • Brief History, Jacobians, and Likelihoods. • Implementation and examples in NONMEM (V or VI) Wolverine Pharmacometrics Corporation
What is Transform Both Sides (TBS)? Consider our usual set up: Yij = PRED(,)ij + ij Where i indexes subject and j indexes the response or prediction within subject i. The assumption here is that ij ~ N(0,2) In other words, the within subject variability does not depend on time, the PREDiction, or who the subject is (i). Wolverine Pharmacometrics Corporation
What is Transform Both Sides (TBS)? Consider an invertible transformation T, with a domain compatible with what is being transformed (response and prediction)... Then in general TBS is... T( Yij)= T(PRED(,)ij)+ ij Once again, the assumption here is that ij ~ N(0,2) Wolverine Pharmacometrics Corporation
What is Transform Both Sides (TBS)? A simple example (no transformation parameter) ln( Yij)= ln(PRED(,)ij)+ ij ;Yij>0, PRED(,)ij>0 A dynamic example (with ) Wolverine Pharmacometrics Corporation
Why Bother with TBS? Wolverine Pharmacometrics Corporation
Useful Resources http://www.stat.uconn.edu/~studentjournal/index_files/pengfi_s05.pdf Carroll Rupert (1988) Transformation and Weighting in Regression Estimating Data Transformations in Nonliner Mixed Effect Models; Oberg and Davidian; Biometrics 56,65-72;March 2000. Wolverine Pharmacometrics Corporation
Transformations, Likelihoods and Jacobians. Suppose we have a continuous random variable, X whose logarithm is distributed N(, 2). Letting Y=ln(X) we know that the density for Y is... Wolverine Pharmacometrics Corporation
But What is the Distribution for X? To find fX(x) when X=g(Y), and g is monotone, we use the following change of variable formula... Wolverine Pharmacometrics Corporation
OK, so we turn the crank! • X=g(Y) = exp(Y) • Y=g-1(X) = ln(X) • d/dX(g-1(X)) = 1/X Wolverine Pharmacometrics Corporation
Now lets Focus on the Dynamic Box-Cox TBS Our assumption is that ... Let, so and Wolverine Pharmacometrics Corporation
Example • A new ‘patch’ has been developed for bromodrosis. • The T/2 is short and we have 7 steady state serum concentrations on each of 100 subjects. • This may be the simplest possible PK example! Wolverine Pharmacometrics Corporation
Initial Model (CWS7.TXT) $PROBLEM $DATA NMDATA7.CSV $INPUT ID DV ; JUST ID AND SERUM CONCENTRATION! $PRED W=THETA(2) ;ADDITIVE SD CL=THETA(1)*EXP(ETA(1)) ;CL/F WITH BETWEEN SUBJECT VAR PRE=1/CL ;@ SS ASSUMING INPUT RATE = 1 4 ALL RES1=(DV-PRE)/W ;FORM A WITHIN SUBJECT RESIDUAL Y=PRE+EPS(1)*W $THETA (0,.1) ;CL/F (0,1) ;SD ADDITIVE $OMEGA .1 $SIGMA 1 FIX $EST MAXEVALS=9999 METH=1 PRINT=1 ; JUST BECAUSE! $COV PRINT=E $TABLE ID RES1 ONEHEADER NOAPPEND NOPRINT FILE=TWS7.TXT Wolverine Pharmacometrics Corporation
Graphics. Wolverine Pharmacometrics Corporation
CWS7L.TXT / CWS7L1.TXT $SUB CONTR=CONTR.TXT CCONTR=CCONTRA.TXT $PRED W=THETA(2) ;SD CL=THETA(1)*EXP(ETA(1)) ;CL/F PRE=1/CL ;@ SS ASSUMING INPUT RATE = 1 LAM=THETA(3) ;BOX COX LAMBDA PARAMETER PREL=(PRE**LAM-1)/LAM ;TRANSFORMED PREDICTION Y=PREL+EPS(1)*W ;ADDITIVE WITHIN SUBJECT ERROR IN ;THE TRANSFORMED SPACE RES1=((DV**LAM-1)/LAM-PREL)/W ;RESIDUAL IN THE T SPACE $THETA (0,.1) ;CL/F (0,1) ;SD ADDITIVE (0,1) ;BOX COX LAMBDA PARAMETER $OMEGA .1 ; THIS INIT WORKS FINE WITH NMV NM6?? $SIGMA 1 FIX $EST MAXEVALS=9999 METH=1 PRINT=1 $COV PRINT=E $TABLE ID RES1 ONEHEADER NOAPPEND NOPRINT FILE=TWS7L.TXT Wolverine Pharmacometrics Corporation
CCONTRA.TXT subroutine ccontr (icall,c1,c2,c3,ier1,ier2) parameter (lth=40,lvr=30,no=50) common /rocm0/ theta (lth) common /rocm4/ y double precision c1,c2,c3,theta,y,w,one,two dimension c2(*),c3(lvr,*) data one,two/1.,2./ if (icall.le.1) return w=y y=(y**theta(3)-one)/theta(3) call cels (c1,c2,c3,ier1,ier2) y=w c1=c1-two*(theta(3)-one)*log(y) return end Wolverine Pharmacometrics Corporation
Regression Engine Bake Off Wolverine Pharmacometrics Corporation
Last Slide Wolverine Pharmacometrics Corporation