NONMEM Users Network Archive

Hosted by Cognigen

RE: [NMusers] Calculation of half life

From: Abu Helwa, Ahmad Yousef Mohammad - abuay010 <>
Date: Thu, 31 Mar 2016 00:29:39 +0000

Hi Santosh:

  You can calculate half life for a 3-compartment model using the following R code example. This is based on the article published by Richard Upton Richard Upton
Journal of Pharmacological and Toxicological Methods 49 (2004) pg. 65-68

#Three compartment model
CL <- 2
V1 <- 10
Q12 <- 0.5
V2 <- 30
Q13 <- 0.3
V3 <- 40

#Rate constant parameterization
k10 <- CL/V1
k12 <- Q12/V1
k21 <- k12*V1/V2
k13 <- Q13/V1
k31 <- k13*V1/V3

j <- k12+k10+k21+k31+k13
k <- k12*k31+k10*k21+k10*k31+k21*k31+k13*k21
l <- k10*k21*k31

m <- (3*k - j^2)/3
n <- (2*j^3 - 9*j*k + 27*l)/27
Q <- (n^2)/4 + (m^3)/27

alpha <- sqrt(-1*Q)
beta <- -1*n/2
rho <- sqrt(beta^2+alpha^2)
theta <- atan2(alpha,beta)

lambda1 <- j/3 + rho^(1/3)*(cos(theta/3) + sqrt(3)*sin(theta/3))
lambda2 <- j/3 + rho^(1/3)*(cos(theta/3) - sqrt(3)*sin(theta/3))
lambda3 <- j/3 -(2*rho^(1/3)*cos(theta/3))

thalf_alpha <- log(2)/lambda1
thalf_beta <- log(2)/lambda2
thalf_gamma <- log(2)/lambda3

From: [] On Behalf Of luann
Sent: Thursday, 31 March 2016 4:19 AM
To: Santosh <>
Subject: Re: [NMusers] Calculation of half life


There is an article that provides the equations that I think you are looking for.
Calculating the hybrid (macro) rate constants of a three-compartment mamillary pharmacokinetic model from known micro-rate constants.
Richard Upton
Journal of Pharmacological and Toxicological Methods 49 (2004) pg. 65-68

Best regards,

Luann Phillips
Director, Pharmacometrics
Buffalo Office: +1-716-633-3463 ext. 236 | Website<>

For news and events, follow us on: LinkedIn<> | Twitter<> | YouTube<> | Facebook<>
Join the GastroPlus™ User Group<> to interact with peers around the world

On Wed, Mar 30, 2016 at 11:40 AM, Santosh wrote:

Dear all,
I am looking for ways to calculate t[1/2,lamda,z] the elimination phase half life, using a 3-compartment model. ADVAN 12 and TRANS6 seems to be a way. However, I am using the intercompartment clearance and volumes based parameterization, e.g. Q3,V3 etc.. = log(2)/gamma

Could anyone please share NONMEM code to compute the half-life based on gamma?

Thanks so much in advance.

Best regards,

(image/jpeg attachment: image001.jpg)

Received on Wed Mar 30 2016 - 20:29:39 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: Once subscribed, you may contribute to the discussion by emailing: