RE: The number of columns (variables) in $INPUT block
From: "Sale, Mark" <ms93267@GlaxoWellcome.com>
Subject: RE: The number of columns (variables) in $INPUT block
Date: Wed, 2 May 2001 15:12:59 -0400
Alan
We have this problem commonly, when doing a "two stage analysis" and we want to read in many pk parameters or etas for a second stage pd model. A more technical, but perhaps more efficient method that can be used if the values that you want only change by person (e.g., with etas) is to call an external function (called myeta.for here) that reads the next line that contains the values for that person. In this case, you can have an unlimited number of columns. The parameters are in an ASCII text file, which is opened by infn (myinfn.for here) , then read by the verbatim call below. We also include the ID in the ETA file (called WHO here), and confirm that we are reading the correct ETA for each subject. (that part isn't in this control file).
Mark
The control file is below
$PROB 20005
$DATA data2.prn IGNORE = #
$INPUT ID TIME AMT DV CMT AGE BMI SEX RACE DOSE SU
PREV DDUR FSGR WTR STD
$SUBS ADVAN6 TOL=6 INFN=MYINFN.FOR OTHER = MYETAS.FOR
$MODEL
COMP = (GLU)
COMP = (FIRST)
COMP = (SECND)
$PK
" FIRST
" DOUBLE PRECISION ET1,ET2,ET3,ET4,ET5,ET6
" IF(NEWIND.LE.1) THEN
" CALL MYETAS(WHO,ET1,ET2,ET3,ET4,ET5,ET6)
" END IF
TVKN = THETA(1)+THETA(2)*PREV
KIN = TVKN*EXP(ET1)
TVKT = THETA(3)+THETA(4)*PREV
KOUT = TVKT*EXP(ET2)
EMAX = THETA(5)
IF(SU.EQ.0) THEN
ED50 = (BMI*THETA(6)+THETA(7))*EXP(ET3)
ELSE
ED50 = THETA(8)*EXP(ET4)
END IF
F1 = KIN/KOUT
PLMX = THETA(9)*EXP(ET5)
PLTD = THETA(10)
PLPW = THETA(11)
IF(PREV.GT.0) THEN
PRID = 1
ELSE
PRID = 0
END IF
PLAC = PRID*(1-SU)*PLMX*TIME**PLPW/(PLTD**PLPW+TIME*PLPW)
RLSL = THETA(12)+ET6
RLPL = RLSL*TIME
KMAX = THETA(13)*EXP(ETA(1))
C50 = (SU*THETA(14)+(1-SU)*THETA(15)) *EXP(ETA(2))
HKOT = THETA(16)*EXP(ETA(3))
F2 = (KMAX*F1/(C50+F1))/HKOT
F3 = (HKOT*F2 + KMAX*F1/(C50+F1))/HKOT
ETS1 = ETA(1)
ETS2= ETA(2)
ETS3 = ETA(3)
$DES
DADT(1) = KIN*(1-DOSE*EMAX/(ED50+DOSE)) - KOUT*A(1)
GLU = A(1) + PLAC + RLPL
DADT(2) = KMAX*GLU/(C50+A(1)) - HKOT*A(2)
DADT(3) = HKOT*A(2) + KMAX*GLU/(C50+A(1)) - HKOT*A(3)
$ERROR
IPRED = (A(2)+A(3))/2
Y = IPRED*EXP(EPS(1))
$THETA
(2.92,FIXED)
(2.36,FIXED)
(0.314,FIXED)
(0.107,FIXED)
(0.584,FIXED)
(-0.218,FIXED)
(10.5,FIXED)
(3.80,FIXED)
(1.64,FIXED)
(5.27,FIXED)
(0.752,FIXED)
(0.00504,FIXED)
(0,.0211)
(0,10.4)
(0,12.5)
(0,.183)
$OMEGA BLOCK(3)
1.97
-.121 0.429
2 -0.344 2.15
$SIGMA
0.00132
;$MSFI = MSF1
$EST MAX = 9999 PRINT=10 METH= 1 MSFO = MSF2 POSTHOC
$COV
$TABLE ID TIME MDV BMI DOSE IPRED
AGE SEX DDUR SU PREV FSGR ETS1 ETS2 ETS3
NOPRINT FILE = OUT.DAT