Brus
☆    

Spain,
2022-12-25 10:21
(42 d 18:29 ago)

Posting: # 23410
Views: 708
 

 How to calculate With­in-sub­ject vari­abi­lity in a replicated BE [General Sta­tis­tics]

Hi to everybody,

I have calculated the ISCV% from a replicated BE with the estimated s2wr. For this, I have calculated the standar deviation of the two observations (BE replicated) of each subject, then I have calculated the mean of all SD, and with that mean of SD I have calculated the ISCV% according to the below formula:

CV%= 100*square root(e^s2wr-1)

Can anyone confirm that it is correct?

Thank you so much,

Best regards,
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2022-12-25 13:17
(42 d 15:34 ago)

@ Brus
Posting: # 23411
Views: 591
 

 Models, models!

Hi Brus,

❝ Can anyone confirm that it is correct?


That’s an approximation (like a model with subject as the only effect).
According to the EMA’s Q&A document we have to fit a linear model of R-data with fixed effects sequence, subject(sequence), period and calculate CVwR from the models’ residual MSE. As usual, you could drop sequence (keep only subject and period). :-D

library(replicateBE)
library(PowerTOST)
df       <- data.frame(method = c("approximate", "simple", "EMA",
                                  "no sequence", "FDA"),
                       CVwR = NA_real_)
# EMA reference data set I, only untransformed PK after R
dataR    <- rds01[rds01$treatment == "R", c(1:3, 5)]
subj     <- levels(dataR$subject)
varR     <- rep(NA_real_, length(subj))
dlat     <- data.frame(sequence = NA, cont = rep(NA_real_, length(subj)))
for (j in seq_along(subj)) {
  varR[j] <- var(log(dataR[dataR$subject == subj[j], "PK"]))
  if (length(dataR[dataR$subject == subj[j], "PK"]) == 2) {
    # intra-subject contrast
    dlat$cont[j]     <- diff(log(dataR[dataR$subject == subj[j], "PK"]))
    dlat$sequence[j] <- as.character(unique(dataR[dataR$subject == subj[j], "sequence"]))
  }
}
dlat$sequence <- factor(dlat$sequence)
# All analysis on complete cases only!
# Approximation

df[1, 2] <- 100 * mse2CV(mean(varR, na.rm = TRUE))
# Simple model
mod1     <- lm(log(PK) ~ subject, data = dataR, na.action = na.omit)
df[2, 2] <- 100 * mse2CV(anova(mod1)["Residuals", "Mean Sq"])
# Model acc. to the EMA’s Q&A document
mod2     <- lm(log(PK) ~ sequence + subject %in% sequence + period,
                         data = dataR, na.action = na.omit)
df[3, 2] <- 100 * mse2CV(anova(mod2)["Residuals", "Mean Sq"])
# Sequence effects dropped
mod3     <- lm(log(PK) ~ subject + period, data = dataR, na.action = na.omit)
df[4, 2] <- 100 * mse2CV(anova(mod3)["Residuals", "Mean Sq"])
# FDA’s model
mod4     <- lm(cont ~ sequence, data = dlat, na.action = na.omit)
df[5, 2] <- 100 * mse2CV(anova(mod4)["Residuals", "Mean Sq"] / 2)
print(df, digits = 5, row.names = FALSE, right = FALSE)

 method      CVwR 
 approximate 47.627
 simple      47.627
 EMA         46.964
 no sequence 46.964
 FDA         46.964

BTW, from the FDA’s mixed-effects model we could directly get CVwR with 47.328. I love lacking harmonization.

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
UA Flag
Activity
 Admin contact
22,479 posts in 4,709 threads, 1,603 registered users;
16 visitors (0 registered, 16 guests [including 10 identified bots]).
Forum time: 04:51 CET (Europe/Vienna)

The rise of biometry in this 20th century,
like that of geometry in the 3rd century before Christ,
seems to mark out one of the great ages or critical periods
in the advance of the human understanding.    R.A. Fisher

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