Closed andreasmeid closed 3 years ago
Hi Andreas, My answers so far:
NA
in the DV column of your output, since only administration lines are shown.$OMEGA
block, a variance-covariance matrix of inter-individual variability is expected, or, at least its diagonal, i.e. the variances. So, you have to set the values of omega², and not the CV%. $CMT
in your code, with GUT first, then CENTRAL and PERIPH at last. Because in the background I'm not sure how mrgsolve behaves with the $PKMODEL routine when compartment are not properly named... Also, in your data, the drug is both administered and observed in compartment 1 (cmt = 1
), which I guess is not correct ?mrgsim(NONMEN_model)
returns a CL of 0.1 (on average), while you specified a typical value of 3.59, so it is maybe unlikely ?Please let me know if some of these helped - or did not !
Félicien
I also took a look to the published model. Random effects were set on microconstant (K, K12, K21) instead of clearance. For a more accurate approach, I would also suggest you to do the same in your model by defining K, K12 and K21 in $MAIN. Then, just define CL, V3 and Q as function of these pre-defind K,K12 and K2 where IIV was applied. (Or, even easier, implement the microconstants directly in differential equations in $ODE) Félicien
Dear Félicien, thank you very much for these tips;
What can be the reason for this, meaning that practically no iiv exists, although the measured values deviate clearly from the population predictions? I have attached the updated code again and am as always very grateful for every step towards the solution of the problem. Best wishes Andreas
NONMEM_code <- "
$PROB
;----------------------------------------;
;Stage1 Final Model from
;----------------------------------------;
$PARAM @annotated
TVKA: 0.471 : Absorption constant morning (1/h)
TVCLR: 1.57 : Renal clearance (L/h)
TVCLNR: 2.02 : Non-renal clearance (L/h)
TVV2: 29.8 : Central volume
TVQ : 1.62 : Intercompartmental clearance
TVV3 : 26.7 : Peripheral volume of distribution
ETA1: 0 : Absorption / random effects (1/h)
ETA2: 0 : k as Clearance/Volume (1/h)
ETA3: 0 : Central volume (L)
ETA4: 0 : k21 (1/h)
ETA5: 0 : k12 (1/h)
$PARAM @annotated @covariates
D_WTB : 70 : Body weight (kg) at baseline
EVENING : 1 : evening dose = 1, morning dose = 0
SEX : 0 : 0:Male, 1:Female
AGE : 69 : Age in years at baseline
D_CCRCLB : 70 : Creatinine clearance CCG
$CMT @annotated
GUT : Dosing compartment (mg)[ADM]
CENT : Central compartment (mg/L)[OBS]
PERIPH: Peripheral compartment V3 ()
$MAIN
double V2 = TVV2*(pow(D_WTB/65,0.806))*(1−0.0217) * exp(ETA3 + ETA(3)) ;
double KA = TVKA * pow((1-0.434), EVENING) * exp(ETA1 + ETA(1)) ; //* pow(0.201, MORNING); // * pow(0.201, MORNING)
double CL = ( (((TVCLR*(D_CCRCLB/70)) + (TVCLNR* (pow(AGE/69, −0.429))*(1+SEX*(−0.215))) )*(1−0.149)) ); // * pow(BW / 70, 1.2) ;
double Q = TVQ ;
double V3 = TVV3 ;
double k10 = CL/V2 * exp(ETA2 + ETA(2));
double k21 = Q/V3* exp(ETA4 + ETA(4));
double k12 = Q/V2 * exp(ETA5 + ETA(5));
$OMEGA 0.271 0.101 0.0287 0.243 1.49
$SIGMA @labels PROP ADD
0.00 // proportional
0.3 // additive
$ODE
dxdt_GUT = -KA*GUT;
dxdt_CENT = KA*GUT -k12*CENT+k21*PERIPH - k10*CENT;
dxdt_PERIPH = k12*CENT-k21*PERIPH;
$TABLE
double IPRED = CENT/V2;
double DV = (CENT/V2) *(1+PROP)+ADD;
$CAPTURE DV CL KA V2 Q V3
"
In Cirincione et al, concentrations were log-transformed before analysis, thus the error is not additive, but log-additive or "exponential". You can either tweak your model and your data to work on log-transformed concentrations, or (I would recommend) just define DV and $SIGMA as such in the model:
$SIGMA
0
0.09 // (sigma square = 0.3^2)
$TABLE
double DV = (CENT/V2) * exp(EPS(2));
and mapbayr will automatically log-transform the data in the background for you. Now here is what I get:
Model: NONMEN_model
ID : 1 individual(s).
OBS: 2 observation(s).
ETA: 5 parameter(s) to estimate.
Estimates:
ID ETA1 ETA2 ETA3 ETA4 ETA5
1 1 -0.1125337 -0.7029937 0.02217481 0.1390427 -0.4949399
Output (11 lines):
ID time evid cmt amt mdv DV IPRED PRED CL KA V2 Q V3 D_WTB EVENING SEX AGE
1 1 0 1 1 2.5 1 NA 0.00000000 0.00000000 2.630706 0.4208702 35.23717 1.62 26.7 80 0 1 76
2 1 12 1 1 2.5 1 NA 0.04192383 0.02835984 2.630706 0.2382125 35.23717 1.62 26.7 80 1 1 76
3 1 24 1 1 2.5 1 NA 0.06913702 0.03845168 2.630706 0.4208702 35.23717 1.62 26.7 80 0 1 76
4 1 36 1 1 2.5 1 NA 0.08680916 0.04695545 2.630706 0.2382125 35.23717 1.62 26.7 80 1 1 76
5 1 48 1 1 2.5 1 NA 0.10108846 0.05007575 2.630706 0.4208702 35.23717 1.62 26.7 80 0 1 76
6 1 60 1 1 2.5 1 NA 0.11047949 0.05484438 2.630706 0.2382125 35.23717 1.62 26.7 80 1 1 76
Wonderful, Félicien, many thanks! That works perfectly
Close with remark that residual variability needs to be properly defined :-)
Dear Félicien,
sorry for asking again. Now I am trying to apply mapbayr to a published (NONMEM) model. I probably missed something fundamental in the mrgsolve code, because the mapbayest function shows only NA for the variable DV.
Also, the inter-individual variability (via the omegas) does not seem to work properly; population predictions and individual predictions are practically on top of each other. The estimated omegas must already be used in the code, right (see for example Table 3 of Cirincione B et al. CPT Pharmacometrics Syst Pharmacol 2018;7:728-738)? Or is the are the CV values to be considered for this?
Following, I have attached my code; it would be nice if you could take a critical look at it and maybe spot the errors.
Many thanks and best wishes
Andreas
R Code: