Rose is a rose is a rose is a rose [General Sta­tis­tics]

posted by Helmut Homepage – Vienna, Austria, 2023-06-15 16:49 (513 d 11:32 ago) – Posting: # 23599
Views: 2,228

Hi Brus,

❝ Sorry, because I am lego and I can´t understand all correctly.

:-D

❝ ❝ There is no ‘R1’ and ‘R2’, only one R repeatedly administered in the sequences in different periods. Say, the sequences are TRR | RTR | RRT. Did the CRO call the first administration in each sequence R1 and the second R2 (while dropping T)?

❝ Yes. But, although this is not the usual approach, if you set the R treatment as R1 and R2, you can make an R1 / R2 comparison, as if they were different treatments, right?

Nope. Though you call them different treatments, they aren’t. You have one and only one treatment – administered in different sequences / periods.

❝ And in this way, Is the 90% CI calculated by the CRO well calculated? It seems to me to be a very large interval for a CV of 20%.

There is no right or wrong. Calculating a PE and CI doesn’t make sense.

❝ ❝ As said above, such a ‘comparison’ will not work.

❝ Why? Can you explain?

[image]I’ll try… In a 2×2×2 crossover you have two different but similar things, say, apples and oranges and compare their weights (© Stephen Senn).
In your partial replicate you ignored the apple and tried to compare oranges with oranges. What? Heck, they are the same. Only conditions differed.

❝ ❝ You can only calculate the CVwR according to the EMA’s or the FDA’s models. The results will be similar, though quite often the one of the FDA is a bit smaller.

❝ But, although this is not the usual approach, if you set the R treatment as R1 and R2, you can make an R1 / R2 comparison, if you want to do it just for curiosity, considering them as different treatments, it will be feasible, right? And in this way, Is the 90% CI calculated by the CRO well calculated?

No, that’s nonsense. I think we are going in circles. What do you want achieve?

Rose is a rose is a rose is a rose.

Let’s explore the EMA’s reference data set II, both with the approach given in the Q&A as well as with yours. See the [image]-script at the end.

Type III AOV (CVwR: EMA approach)
Response: log(PK)
                 Df   Sum Sq  Mean Sq  F value     Pr(>F)
sequence          2 0.023936  0.01197  0.08523    0.91862
period            2 0.039640  0.01982  1.43328    0.24898
sequence:subject 21 2.948968  0.14043 10.15485 4.6897e-11
Residuals        46 0.636114  0.01383                   
CVwR (%)                     
11.80027

Type III AOV (pseudo 'R2' vs 'R1')
Response: log(PK)
                 Df   Sum Sq  Mean Sq F value     Pr(>F)
sequence          2 0.049616  0.02481 0.28973    0.75141
period            2 0.018554  0.00928 0.71416    0.50112
treatment         1 0.000044  0.00004 0.00336    0.95435
sequence:subject 21 1.798142  0.08563 6.59175 3.0663e-05
Residuals        21 0.272787  0.01299                   
CVw (%)                     
11.43441                   

'PE':  99.43%
'CI':  83.90%, 117.84%


Not only the SEs are different but also the degrees of freedom and therefore, the MSEs / CVs.
CI2CV() from the ‘pseudo R comparison’ does not work with any design-argument.


library(PowerTOST)
# EMA Dataset II (partial replicate, balanced, complete, 24 subjects)
EMA.II    <- read.csv("https://bebac.at/downloads/ds02.csv",
                      colClasses = c(rep("factor", 4), "numeric"))
options(digits = 12) # more digits for anova
# The EMA’s approach for CVwR
mod.CVwR  <- lm(log(PK) ~ sequence + subject %in% sequence + period,
                          data = EMA.II)
typeIII.a <- anova(mod.CVwR)
attr(typeIII.a, "heading")[1] <- "Type III AOV (CVwR: EMA approach)"
MSdenom   <- typeIII.a["sequence:subject", "Mean Sq"]
df2       <- typeIII.a["sequence:subject", "Df"]
fvalue    <- typeIII.a["sequence", "Mean Sq"] / MSdenom
df1       <- typeIII.a["sequence", "Df"]
typeIII.a["sequence", 4] <- fvalue
typeIII.a["sequence", 5] <- pf(fvalue, df1, df2, lower.tail = FALSE)
CVwR      <- 100 * mse2CV(typeIII.a["Residuals", "Mean Sq"])
typeIII.a <- rbind(typeIII.a, CVwR = c(NA, NA, CVwR, NA, NA))
row.names(typeIII.a)[5] <- "CVwR (%)"

# Only R; clumsy but transparent
# Keep the codes of sequence and period

EMA.II.R  <- EMA.II[EMA.II$treatment == "R", ]
EMA.II.Rs <- cbind(EMA.II.R, dummy = NA_character_)
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "TRR" & EMA.II.Rs$period == 2] <- "R1"
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "TRR" & EMA.II.Rs$period == 3] <- "R2"
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "RTR" & EMA.II.Rs$period == 1] <- "R1"
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "RTR" & EMA.II.Rs$period == 3] <- "R2"
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "RRT" & EMA.II.Rs$period == 1] <- "R1"
EMA.II.Rs$dummy[EMA.II.Rs$sequence == "RRT" & EMA.II.Rs$period == 2] <- "R2"
EMA.II.Rs$dummy <- as.factor(EMA.II.Rs$dummy)
EMA.II.Rs$treatment <- EMA.II.Rs$dummy
# Compare second administration of R with the first
mod.ABE <- lm(log(PK) ~ sequence + subject %in% sequence + period + treatment,
                        data = EMA.II.Rs)
typeIII.b <- anova(mod.ABE)
attr(typeIII.b, "heading")[1] <- "Type III AOV (pseudo \'R2\' vs \'R1\')"
MSdenom   <- typeIII.b["sequence:subject", "Mean Sq"]
df2       <- typeIII.b["sequence:subject", "Df"]
fvalue    <- typeIII.b["sequence", "Mean Sq"] / MSdenom
df1       <- typeIII.b["sequence", "Df"]
typeIII.b["sequence", 4] <- fvalue
typeIII.b["sequence", 5] <- pf(fvalue, df1, df2, lower.tail = FALSE)
CVw       <- 100 * mse2CV(typeIII.b["Residuals", "Mean Sq"])
typeIII.b <- rbind(typeIII.b, CVw = c(NA, NA, CVwR, NA, NA))
row.names(typeIII.b)[6] <- "CVw (%)"
PE        <- 100 * exp(coef(mod.ABE)[["treatmentR2"]])
CI        <- setNames(100 * as.numeric(exp(confint(mod.ABE, "treatmentR2",
                                                   level= 1 - 2 * 0.05))),
                      c("lower", "upper"))
txt       <- paste("\n\'PE\':", sprintf("%6.2f%%", PE),
                   "\n\'CI\':", sprintf("%6.2f%%, %6.2f%%\n",
                                        CI["lower"], CI["upper"]))
print(typeIII.a, digits = 6, signif.stars = FALSE)
print(typeIII.b, digits = 6, signif.stars = FALSE); cat(txt)


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
23,291 posts in 4,891 threads, 1,661 registered users;
78 visitors (0 registered, 78 guests [including 3 identified bots]).
Forum time: 03:22 CET (Europe/Vienna)

I never did anything worth doing by accident,
nor did any of my inventions come by accident;
they came by work.    Thomas Alva Edison

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