15.1 약동학 예제

d1 = Theoph
colnames(d1) = c("ID", "BWT", "DOSE", "TIME", "DV")
d2 = d1[d1$ID == 1,]
plot(d2[, "TIME"], d2[, "DV"], type="o", xlab="Time (h)", ylab="Concentration (mg/L)")
Time-concentration curve for subject ID=1

Figure 15.1: Time-concentration curve for subject ID=1

이 자료를 적합하기 위한 가장 단순한 약동학 모형인 one-compartment model을 그림으로 나타내면 다음과 같다.

dA = data.frame(No=c(1, 2), Name=c("Gut Depot", "Central"), Level=c(1, 2), xPos=c(1, 1))
dB = data.frame(From = c(1, 2, 0), To=c(2, 3, 1), Name=c("KA", "K", "F"))
par(oma=c(0, 0, 0, 0), mar=c(0, 0, 0, 0))
pComp(dA, dB, Shape="circ", Col="#DDEEFF", asp=1)
One-compartment model

Figure 15.2: One-compartment model

fPK = function(THETA)     # Prediction function
{
  DOSE = 320              # mg
  TIME = e$DATA[,"TIME"]  # use data in e$DATA

  K    = THETA[1]
  Ka   = THETA[2]
  V    = THETA[3]

  Cp   = DOSE/V*Ka/(Ka - K)*(exp(-K*TIME) - exp(-Ka*TIME))
  return(Cp)
}

r1 = nlr(fPK, d2, pNames=c("k", "ka", "V"), IE=c(0.1, 3, 500),
         SecNames=c("CL", "Thalf", "MRT"), SecForms=c(~V*k, ~log(2)/k, ~1/k))
r1
$Est
               k         ka         V  AddErrVar   AddErrSD         CL     Thalf
PE   0.053954263  1.7774182 29.394229  0.3896373  0.6242093  1.5859440 12.846940
SE   0.007783999  0.2299938  1.449530  0.1661419  0.1330819  0.1728501  1.853432
RSE 14.427032334 12.9397663  4.931342 42.6401506 21.3200753 10.8988797 14.427032
          MRT
PE  18.534217
SE   2.673937
RSE 14.427032

$Cov
                      k            ka             V     AddErrVar
k          6.059064e-05 -9.280456e-04 -9.013856e-03 -2.008739e-08
ka        -9.280456e-04  5.289713e-02  2.119640e-01  3.154113e-07
V         -9.013856e-03  2.119640e-01  2.101137e+00  4.230416e-06
AddErrVar -2.008739e-08  3.154113e-07  4.230416e-06  2.760313e-02

$run
$run$m
[1] 5

$run$n
[1] 6

$run$run
[1] 5

$run$p.value
[1] 0.2619048


$`Objective Function Value`
[1] 0.632068

$`-2LL`
[1] 20.84872

$AIC
[1] 28.84872

$AICc
[1] 35.51538

$BIC
[1] 30.4403

$Convergence
NULL

$Message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"

$Prediction
 [1] 0.000000 3.877505 6.810849 9.035307 9.758251 9.123553 8.525224 7.683263 6.889938
[10] 5.838201 3.014648

$Residual
 [1]  7.400000e-01 -1.037505e+00 -2.408487e-01  1.464693e+00 -9.825074e-02 -5.435526e-01
 [7] -1.652238e-01 -2.132634e-01  6.207842e-05  1.017993e-01  2.653524e-01

$`Elapsed Time`
Time difference of 0.01857305 secs
oPar = par(mfrow=c(1, 2))
dx(r1) # simple diagnostic plot
Diagnostic plot of regression

Figure 15.3: Diagnostic plot of regression