Using Torsten
The reader should have a basic understanding of how Stan works. In this section we go through the different functions Torsten adds to Stan. The code for the examples can be found at Torsten’s example models.
0.1 Events specification
Torsten’s functions are prefixed with pmx_
.
For some of their arguments we adopt NM-TRAN format for events
specification(Table 1).
Argument Name | Definition | Stan data type |
---|---|---|
time |
event time | real[] |
amt |
dosing amount | real[] |
rate |
infusion rate | real[] |
ii |
interdose interval | real[] |
evid |
event ID | int[] |
cmt |
event compartment | int[] |
addl |
additionial identical doses | int[] |
ss |
steady-state dosing flag | int[] |
All the real[]
arguments above are allowed to
be parameters
in a Stan model.
In addtion, Torsten functions
support optional arguments and overloaded signatures.
Optional arguments are indicated by surrounding square bracket []
.
Table below shows three commonly used PMX model arguments that support
overloading. In the rest of this document we assume this convention unless indicated otherwise.
Argument Name | Definition | Stan data type | Optional |
---|---|---|---|
theta |
model parameters | real[] or real[ , ] |
N |
biovar |
bioavailability fraction | real[] or real[ , ] |
Y (default to 1.0) |
tlag |
lag time | real[] or real[ , ] |
Y (default to 0.0) |