Skip to content

Commit

Permalink
Add test models
Browse files Browse the repository at this point in the history
  • Loading branch information
vrognas committed Sep 4, 2024
1 parent 08d84d3 commit d068478
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/maximal.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ $SIZES SD=20

$PROBLEM MAXIMAL PPRED MODEL

$DATA pheno.dta IGNORE=@
$DATA data1.csv
IGNORE=#
IGN=(DOSE.GT.0) ;only placebo data are used

$INPUT ID TIME AMT WGT APGR DV
EVID HT=DROP MDV
Expand All @@ -24,7 +26,7 @@ $EST
$ESTIMATE METHOD=FO

$SUBROUTINE ADVAN
//#region

$ABBREVIATED PROTECT

$MIX
Expand All @@ -40,7 +42,7 @@ X = EXP(TRX) / (1 + EXP(TRX)) ; Constrained between 0 and 1

$PK
; comment
//#endregion

A = 10E4
B = 10E-4
C = 10**4
Expand All @@ -58,13 +60,13 @@ ELSEIF (A .LT. B) THEN
C = B
ELSEIF (A .EQ. B) THEN
C = B
ELSEIF (A .NEQ. B) THEN
; ELSEIF (A .NEQ. B) THEN
C = B
ELSEIF (A .EQN. B) THEN
C = B
ELSEIF (A .NEN. B) THEN
C = B
ELSEIF (A .NEQN. B) THEN
; ELSEIF (A .NEQN. B) THEN
C = B
ELSEIF (A > B) THEN
C = B
Expand Down
5 changes: 5 additions & 0 deletions test/test-data.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$DATA data1.csv
IGNORE=# ;comment in $DATA
IGN=(DOSE.GT.0)
; Comment on a separate line

2 changes: 2 additions & 0 deletions test/test-problem.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; Comment before $PROBLEM
$PROBLEM base model ; problem_text
22 changes: 22 additions & 0 deletions test/test.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$DES

INH_BSG = 1 ;BSG not in model yet

;------ PKPD_BTP ------
; Inhibition of HB synthesis rate in newly produced RBC
; (unobserved, before RBC release to the blood)
TRT_BTP = TREAT_BTP
IF(T > TEND_BTP) TRT_BTP = 0
INH_BTP = (1 - (TRT_BTP * (IMAX_BTP * DRUG**GAM_BTP) / (IC50_BTP**GAM_BTP + DRUG**GAM_BTP)))

; Observed blood RBC, MCH, HB, and PRE
PR = A(1)

RT1 = A(2)
RT2 = A(3)

RT_IMM = A(4)
RT_MAT = A(5)
RT = RT_IMM + RT_MAT

RC1 = A(6)
28 changes: 28 additions & 0 deletions test/test_assignment.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$PRED

W = -.1E-01
V = -1E1
U = -2E+1
T = -3E-1
S = -4E(1)
R = -5E(+1)
Q = -6E(-1)
P = .25**-.1E-01
O = (THETA(1)*EXP(ETA(1)))-EPS(1)**(-5)
N = THETA(1)*EXP(ETA(1))
M = ERR(1)
L = EPS(1)
K = ETA(1)
J = THETA(1)
I = EXP(((0+1*2)/(3-4))**5-1)
H = ((0+1*2)/(3-4))**5-1
G = (0+1*2)/(3-4)
F = (1*2)/(3-4)
E = (1*2)/3
D = 1*2/3
C = 1+2+3
B = 1+1
A = 1

; comment in $PRED
Y = IPRED + EPS(1)
66 changes: 66 additions & 0 deletions test/test_full.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
; Comment before $PROBLEM
$PROBLEM base model ; problem_text
$DATA data1.csv
IGNORE=# ;comment in $DATA
IGN=(DOSE.GT.0)
; Comment on a separate line

$INPUT ID TIME AMT WGT APGR DV
EVID HT=DROP MDV

$PRED

IF (EVID.EQ.1) IPRED = THETA(1)*EXP(ETA(1))

IF (EVID.EQ.1) THEN
IPRED = THETA(1)*EXP(ETA(1))

; AA = THETA(1)*EXP(ETA(1))
ELSEIF (EVID.EQ.2) THEN
Y = IPRED + EPS(1)
ELSE
Y = IPRED
ENDIF

IF (EVID.EQ.1) THEN
IPRED = THETA(1)*EXP(ETA(1))
Y = IPRED + EPS(1)
ELSE
IPRED = 0
Y = IPRED
ENDIF

W = -.1E-01
V = -1E1
U = -2E+1
T = -3E-1
S = -4E(1)
R = -5E(+1)
Q = -6E(-1)
P = .25**-.1E-01
O = (THETA(1)*EXP(ETA(1)))-EPS(1)**(-5)
N = THETA(1)*EXP(ETA(1))
M = ERR(1)
L = EPS(1)
K = ETA(1)
J = THETA(1)
I = EXP(((0+1*2)/(3-4))**5-1)
H = ((0+1*2)/(3-4))**5-1
G = (0+1*2)/(3-4)
F = (1*2)/(3-4)
E = (1*2)/3
D = 1*2/3
C = 1+2+3
B = 1+1
A = 1

; comment in $PRED
Y = IPRED + EPS(1)

$THTA
$OMEGA
$SIGMA
$ESTM
$COVR
$TAB
; comment last
21 changes: 21 additions & 0 deletions test/test_if-statement.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$PRED

IF (EVID.EQ.1) IPRED = THETA(1)*EXP(ETA(1))

IF (EVID.EQ.1) THEN
IPRED = THETA(1)*EXP(ETA(1))

; AA = THETA(1)*EXP(ETA(1))
ELSEIF (EVID.EQ.2) THEN
Y = IPRED + EPS(1)
ELSE
Y = IPRED
ENDIF

IF (EVID.EQ.1) THEN
IPRED = THETA(1)*EXP(ETA(1))
Y = IPRED + EPS(1)
ELSE
IPRED = 0
Y = IPRED
ENDIF

0 comments on commit d068478

Please sign in to comment.