From: "Piotrovskij, Vladimir [JanBe]" <VPIOTROV@janbe.jnj.com>
Subject: RE: How to calculate confidential interval of a plasma conc. curve
Date: Mon, 7 Dec 1998 15:08:32 +0100
You can use NONMEM to perform Monte-Carlo simulations needed for constructing confidence intervals for predictions, but you have to create first a suitable data set that is cumbersome. If you have access to S-PLUS you can obtain the plots you want in a few seconds.
Below you will find an S-PLUS script which does the job for a simple model you mention in your mail. I used the following arbitrary parameter values. Fixed effects were: THETA(1)=5, THETA(2)=.2, THETA(3)=100. SD for random effects were: SD(ETA(1))=SD(ETA(2)).2, SD(EPS(1))=.1. The time interval for simulations was 0 to 24 h. WT was a normal random variable with mean=70 and SD=4. If you source the script to S-PLUS you will get a plot with the following lines: a model prediction for a 70-kg subject; 5% and 95% confidence intervals for typical values (referred to variability in WT); 5% and 95% confidence intervals for individual concentrations (residual error excluded); 5% and 95% confidence intervals for individual concentrations (residual error included). The script can be easily updated for more complex models.
Apparently, other packages can be applied as well. BTW, using partial derivatives to obtain confidence intervals is good for low variability. If inter- or intraindividual variability or SE for parameter estimates exceeds, say, 30% you may get highly biased CI since Wald approximation which underlies this approach usually fails in this situation.
Hope this helps
#*************** S-PLUS script **************
n _ 200
dose _ 100
# Fixed effect parameters
TH1 _ 5
TH2 _ .2
TH3 _ 100
# Random effects
ETA1 _ rnorm(n,sd=.2)
ETA2 _ rnorm(n,sd=.2)
EPS1 _ rnorm(n,sd=.1)
WT _ rnorm(n, mean=70,sd=4)
# Typical values
TVCL _ TH1 + TH2*WT
TVV _ TH3
# Individual values
CL _ TVCL*(1+ETA1)
V _ TVV*(1+ETA2)
# Conc predictions
x _ seq(0,24,.5)
time _ t(matrix(rep(x,n),ncol=n))
PRED.70 _ dose/TVV*exp(-(TH1 + TH2*70)/TVV*x)
PRED _ dose/TVV*exp(-TVCL/TVV*time)
IPRED _ dose/V*exp(-CL/V*time)
conc _ IPRED*(1+EPS1)
xlm _ range(x)
ylm _ range(conc)
y _ apply(PRED,2,quantile, probs=c(.05,.95))
lines(x,y[1,],lwd=2) ; lines(x,y[2,],lwd=2)
y _ apply(IPRED,2,quantile, probs=c(.05,.95))
lines(x,y[1,],lwd=.5) ; lines(x,y[2,],lwd=.5)
y _ apply(conc,2,quantile, probs=c(.05,.95))
lines(x,y[1,],lwd=.5) ; lines(x,y[2,],lwd=.5)
Subject: How to calculate confidential interval of a plasma conc. curve
Sent: Monday, December 07, 1998 1:47 AM
Dear NONMEM Users,
Could you please give me an answer to the question below? Question for 95% confidential interval of simulated curves!
I obtained the following model for plasma conc. of a drug by NONMEM analyses. CL is dependent on body weight(WT).
(1)ADVAN1 & TRANS2 (one compartment & i.v. administration)
(ETA&EPS: diagonal matrix)
Let me take a person of 70kg for instance. I want to simulate not only a mean time-plasma conc. curve for the person but the 95% confidential interval (95%CI) of the curve.
Question 1: Can I simulate 95%CI including inter- and intraindividual variability(ETA(1), ETA(2),EPS(1))?
Question 2: Can I simulate 95%CI including only interindividual variability(ETA(1),ETA(2))?
Question 3: Can I simulate 95%CI including only intraindividual variability(EPS(1))?
I searched some papers reporting NONMEM analyses. "Population Pharmacokinetics of Procainamide from Routine Clinical Data. Clinical Pharmacokinetics, 9:545-554(1984). Thaddeus H. Grasela, and Lewis B. Sheiner". The paper demonstrates intraindividual variability (using 1 standard deviation), and uncertainty by both inter- and intraindividual variability in Fig.2. But the detail for the calculation method is not shown in the paper.
Dr. Takeshi Tajima
Novartis Pharma K.K.
Tsukuba Research Institute
Ohkubo 8, Tsukuba-shi
From: Lewis Sheiner <firstname.lastname@example.org>
Subject: Re: How to calculate confidential interval of a plasma conc. curve
Date: Mon, 7 Dec 1998 16:23:48 -0500
A few comments on Mats' note ...
---------- Forwarded Message ----------
From: Mats Karlsson, INTERNET:Mats.Karlsson@biof.uu.se
DATE: 12/7/98 2:30 AM
RE: Re: How to calculate confidential interval of a plasma conc. curve
I think that what you call confidence intervals, often are called prediction intervals. Confidence intervals would then be reflecting, not biological variability, but the uncertainty in a detemination of parameters (or something derived from the parameters). PI's and CI's can be obtained in many ways. One would be to simulate many subjects from the final model and then obtain pointwise intervals at the times of interest. This could be applied to both PI's and CI's but in the latter case you would have to use the uncertainty in the parameter estimates for the omega matrix.
THE 95% INTERVAL CALCULATED FROM THE SPREAD OF PREDICTIONS OF SAY CP AT 24 HRS (C24) GOTTEN BY SIMULATING 12-HOUR CP'S FROM A SERIES OF "INDIVIDUALS" SIMULATED FROM THE FINAL MODEL IS A 95% PREDICTION INTERVAL. IT IS THE PREDICTION INTERVAL CONDITIONAL ON THE FINAL MODEL, AND CONTAINS EXPECTED VARIABILITY DUE BOTH TO INTERINDIVIDUAL VARIABILITY AND INTRAINDIVIDUAL VARIABILITY. BUT IT CONTAINS NO COMPONENT OF VARIABILITY DUE TO THE UNCERTAINTY IN THE FITTED MODEL. AN INTERVAL THAT DOES CONTAIN THAT UNCERTAINTY IS NOT READILY AVAILABLE WITH NONMEM, ALTHOUGH IT CAN BE OBTAINED IN THE FOLLOWING WAY:
1. FIT THE MODEL TO THE DATA
2. SIMULATE A DATA SET LIKE THE ORIGINAL ONE FROM THE FITTED MODEL
3. FIT THE DATA GENERATED IN 2
4. SIMULATE THE STATISTIC OF INTEREST (SAY C24) FOR ONE INDIVIDUAL
USING THE PARAMETERS OBTAINED IN 3; SAVE THIS VALUE
5. REPEAT STEPS 2-4 MANY TIMES
6. COMPUTE THE INTERVAL OF INTEREST FROM THE SET OF SAVED STATISTICS
GENERATED BY THE MANY REPLICATIONS OF STEP 4.
STEP 2 INTRODUCES VARIABILITY IN THE DATA WHICH IS TRANSLATED, BY STEP 3, INTO VARIABILITY IN THE PARAMETERS OF THE MODEL. IN BAYESIAN TERMS, STEPS 2,3, IN EFFECT, SAMPLE FROM THE POSTERIOR DISTRIBUTION OF THE MODEL PARAMETER, GIVEN THE ORIGINAL DATA (AND AN UNINFORMATIVE PRIOR).
Another way is to do it using values of derivatives already calculated in NONMEM and accessible in read-only commons. Two example model files are given below, one for PI's and one for CI's. They are adopted from other files and I have done some minor changes and haven't tried them, so there is no guarantee that they will work. The models assume that you have a final model and they are run as a separate step afterwards (although you can do it simultaneously as well) It should be easy to include whatever variability component you want. However, it is important to remember that these intervals are highly approximate.
NOT ONLY ARE THEY APPROXIMATE, BUT, ALTOUGH IT IS CLEAR TO ME THAT MATS KNOWS WHAT THEY ARE, IT IS NOT SO CLEAR TO ME THAT EVERYONE ELSE WILL.
THE FIRST CONTROL STREAM, IF I UNDERSTAND IT CORRECTLY IS, INDEED, AN APPROXIMATION TO THE CONDITIONAL PREDICTION INTERVAL I DISCUSSED ABOVE, AND AS SUCH, DOES NOT CONTIAN MODEL UNCERTAINTY, AS DISCUSSED.
THE SECOND CONTROL STREAM IS TRICKIER TO UNDERSTAND - THE ETAS HAVE VARIANCE EQUAL TO THE ESTIMATION ERROR VARIANCE, SO THAT THE VARIABILITY IN CL AND V WILL BE AN APPROXIMATION TO THE VARIABILITY IN THE POSTERIOR DISTRIBUTION FOR THESE (THE VARIABILITY I INTRODUCED ABOVE USING STEPS 2,3). BUT THEN ONLY THIS VARIABILITY IS PROPAGATED INTO C24 (OR WHATEVER PREDICTION IS COMPUTED). SO THE INTERVAL PRODUCED IS AN APPROXIMATE 95% CONFIDENCE INTERVAL, BUT FOR WHAT? THE ANSWER HERE IS THAT IT IS A CI FOR THE POPULATION MEDIAN C24. THIS MAY BE OF INTEREST (JUST AS A CI FOR THE POPULATION MEDIAN CL IS OF INTEREST), BUT IT IS IMPORTANT TO UNDERSTAND THAT THIS INTERVAL NOW DEALS ONLY WITH MODEL UNCERTAINTY, AND HAS NO COMPONENT OF INTER- OR INTRAINDIVIDUAL VARIABILITY.
Just one comment. In order to do the simulations correctly the full covariance matrix should be used. This is obviously not an issue with performing the simulations in NONMEM. ADAPT II can also perform these simulation using the covariance matrix.
Based on what was described for S-plus...I don't believe that the full covariance matrix was used. This implys that the parameter are independent which may not be a correct assumption.
Geoffrey Yuen, Pharm.D.
5 Moore Drive
RTP, NC 27709
phone 919 483 5676