Description Usage Arguments Value Examples
Makes an interpolation of Pharmacokinetic (PK) data or a simulated PK model over time
1 2 3 4 |
model |
Structural PK model definition (mrgsolve model specification) |
dosing_schedule |
Dosing schedule to simulate the PK model |
parameters |
Estimates of the pharmacokinetic parameters of the model. |
variability |
variability terms for the specified PK parameters. |
tend |
Final time for the simulation of the PK model. |
delta |
a number indicating the increment of a time sequence to simulate from 0 to tend. A small value is needed for a proper interpolation. Default: 0.00005. |
pk.function |
user defined pk function to interpolate instead of interpolating the simulation results of a specified PK model |
missing_times |
numeric vector to indicate the times where the patient missed some of the doses specified in the dosing_schedule argument. |
output.time |
vector of times to interpolate |
output.conc |
vector of drug concentrations to interpolate |
scale |
scaling parameter for y axis |
scale.x |
scaling parameter for x axis |
... |
additional arguments for the mrgsim function from mrgsolve package |
This function returns an interpolation of PK data or a simulated PK model
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
# mrgsolve model specification for a one compartment model and intravenuos administration:
code_iv <- '$PARAM @annotated
TVCL : 8 : Clearance (volume/time)
TVV : 80 : Central volume (volume)
$CMT @annotated
CENT : Central compartment
$MAIN
double CL = exp(log(TVCL) + ETA1);
double V = exp(log(TVV) + ETA2);
$OMEGA @labels ETA1 ETA2
0 0
$GLOBAL
#define CP (CENT)
$PKMODEL ncmt = 1, depot = FALSE
$CAPTURE @annotated
CP : Plasma concentration (mass/volume)'
library(mrgsolve)
#Read the code:
cmt1_iv<- mcode("mymodel", code_iv)%>% Req(CP)
#Specify dosing schedule: 150mg once a day for a month (30 days)
e1 <- ev(amt = 150, ii = 1, addl = 30, time=0)
#Define or change the parameters for the model. Use a list:
newpar <- list(TVCL=7.14*24,TVV=155)
# * TVCL: Typical value for the clearance (volume/time)
# * TVV: Typical value for the volumen of distribution
#Pk function to be used during the simulation of the evolutionary process:
pk=pk.function(model=cmt1_iv,dosing_schedule=e1,tend=30,parameters = newpar)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.