Supp. material + corrections [🇷 for BE/BA]

posted by Helmut Homepage – Vienna, Austria, 2021-12-22 22:44 (155 d 18:49 ago) – Posting: # 22712
Views: 674

Hi Weidson,

a couple of problems:
» […] I need of a dinamic code for to plot a graphic of Individual plasma concentration profiles sorted by treatment and period with whih the mean.

In practice use the nominal time for grouping.

library(ggplot2)
# library(nlme) # not needed
library(plyr)
geomean <- function(x) {
  if (sum(x <= 0) > 0) x[x <= 0] <- NA
  return(exp(mean(log(x), na.rm = TRUE)))
}

Theoph     <- datasets::Theoph # only needed if you re-run the code
# this is a workaround since the nominal times are unknown
Theoph$cut <- cut(Theoph$Time,
                  breaks = c(-0.1, 0, 1, 1.5, 2, 3,
                             4, 6, 8, 12, 16, 20, 25)) # original 24 is not a good idea
tab        <- ddply(Theoph, .(cut), summarize,
                    ntpd = round(mean(Time, na.rm = TRUE), 2))
Theoph     <- merge(Theoph, tab, by = c("cut"), all.x = TRUE)
Theoph     <- Theoph[order(Theoph$Subject, Theoph$Time),
                     c("Subject", "ntpd", "Time", "conc", "Dose", "Wt")]
Theoph$WT <- ifelse (Theoph$Wt < 70, "WT < 70kg", "WT >= 70kg")
p <- ggplot(data = Theoph, aes(x = Time, y = conc, group = Subject)) +
     geom_line() +
     labs(x = "Time (hr)", y = "Concentration (mg/L)") +
     stat_summary(fun = geomean, geom = "line", # original: fun.y = mean
                  aes(x = ntpd, y = conc, group = 1),
                  color = "red", size = 1)
p + facet_grid(. ~ WT)


[image]


However, my workaround is also not ideal. It resolves the issue at the last time point but there are still different concentrations aggregated to the same time point in some subjects, e.g.,

print(Theoph[Theoph$Subject == 8 & Theoph$Time <= 1, 1:4], row.names = FALSE)
Subject ntpd Time conc
      8 0.00 0.00 0.00
      8 0.52
0.25 3.05
      8 0.52
0.52 3.05
      8 0.52
0.98 7.31

I couldn’t find the original data set of Robert Upton anywhere. I made an educated guess based on ‘Study D’,1,2 where the weight range of twelve subjects was reported with 55–86 kg. The dose was 320 mg and what is given in Theoph$Dose is actually Dose/kg. After more detective work based on Table I: The product was Slophyllin aqueous syrup (Dooner Laboratories), 80 mg theophylline per 15-ml dose.

Theoph <- datasets::Theoph
Theoph <- cbind(Theoph, ntpd = c(0, 0.25, 0.5, 1, 2, 3.5, 5, 7, 9, 12, 24))
# continue with Theoph$WT <- ...


[image]


PS: The median in your script is fine. If prefer the geometric mean. Anything is better than the arith­me­tic mean in the original script. ;-)
PPS: Arghl! Mittyri was faster. :clap:


  1. Upton RA, Sansom L, Guentert TW, Powell JR, Thiercellin J-F, Shah VP, Coates PE, Riegelman S. Evaluation of the Absorption from 15 Commercial Theophylline Products Indicating Deficiencies in Currently Applied Bio­avail­ability Criteria. J Pharmacokin Biopharm. 1980; 8(3): 229–42. doi:10.1007/BF01059644.
  2. Interesting: The linear-up / log-down trapezoidal rule was used and \(\small{AUC_{0-\infty}=AUC_{0-\textrm{tlast}}+\frac{\hat{C}_\textrm{tlast}}{k}}\), i.e., the estimated last concentration in extrapolation. I like that. Furthermore, PK was linear up to 500 mg and hence, additionally \(\small{AUC\times k}\) was compared (recall this thread).
    • […] the assumption of constant clearance in the individual between the occasions of receiving the standard and the test dose is suspect for theophylline. […] If there is evidence that the clearance but not the volume of distribution varies in the individual, the \(\small{AUC\times k}\) can be used to gain a more precise index of bioavailability than obtainable from \(\small{AUC}\) alone.

      Confirmed, esp. for \(\small{AUC_{0-\infty}}\):
      \(\small{\begin{array}{lc}
      \textrm{PK metric} & CV_\textrm{geom}\,\%\\\hline
      AUC_{0-\textrm{tlast}} & {\color{Red} {22.53\%}}\\
      AUC_{0-\textrm{tlast}} \times \hat{k} & {\color{Blue} {21.81\%}}\\
      AUC_{0-\infty} & {\color{Red} {28.39\%}}\\
      AUC_{0-\infty} \times \hat{k} & {\color{Blue} {20.36\%}}\\\hline
      \end{array}}\)

Dif-tor heh smusma 🖖 [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

UA Flag
Activity
 Admin contact
22,108 posts in 4,630 threads, 1,567 registered users;
online 4 (0 registered, 4 guests [including 4 identified bots]).
Forum time: Friday 18:33 CEST (Europe/Vienna)

We absolutely must leave room for doubt
or there is no progress and no learning.
There is no learning without having to pose a question.
And a question requires doubt.
People search for certainty.
But there is no certainty.    Richard Feynman

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5