;; Notes:
;; Importance: 0
;; Description: Test covariance
;; Based on: run1.mod
$PROB  THEOPHYLLINE EXAMPLE - base model
$INPUT
STUDYID ID TRT CMT AMT TIME TAFD TALD DV EVID MDV CNTRY SEX AGE WEIGHT HEIGHT BMI FLAGPK STIME RECNO
$DATA NM.theoph.02B.csv IGNORE=@
$SUBROUTINES  ADVAN6 TOL=3
$MODEL
COMP = (ABS)
COMP = (CENTRAL)

$PK
COV1 = (WEIGHT/70)**THETA(4)
COV2 = 1
IF(SEX.EQ.1) COV2 = THETA(5)
KA = THETA(1)
CL = THETA(2) * COV1 * EXP(ETA(1))
V  = THETA(3) * COV2 * EXP(ETA(2))
S2 = V
K  = CL/V
F1 = 1

$DES
CP = A(2)/V
DADT(1) = - KA*A(1)
DADT(2) =   KA*A(1) - K*A(2)

$THETA
(0,.08)  ; KA (1/h)
(0,2)    ; CL (l/h)
(0,1)    ; V (l)
0.2      ; effect of WT
1.2      ; effect of SEX

$OMEGA BLOCK(2)
0.2 ; ETA CL
0.01 0.1 ; ETA V

$ERROR
Y = F * (1 + EPS(1))
IPRED = F

$SIGMA
.1 ; Prop. error

$EST METHOD=1 INTERACTION MAXEVAL=9999  PRINT=5 NOABORT POSTHOC
$COV COMP
$TABLE  ID TRT WEIGHT SEX TIME CWRES IPRED TALD ETA1 ETA2 CNTRY STIME KA CP RECNO  CMT AMT EVID NOPRINT ONEHEADER FILE=par
