a bit corrected workaround [RSABE / ABEL]

posted by mittyri – Russia, 2023-07-08 00:52 (86 d 08:26 ago) – Posting: # 23663
Views: 862

Hi Helmut!

❝ if (ds == "per4full") {

❝   # now the equivalent of SAS code for R-R, dlat analysis

❝   m2 <- lm(RR ~ seq, data = data_r)

❝   dfRR <- m2$df.residual

❝   s2wR <- summary(m2)$sigma^2 / 2

❝ } else {

❝   # workaround because lm() with only one sequence not possible

❝   # make a column with intra-subject variances

❝   for (i in 1:nrow(data_r)) {

❝     data_r$varR[i] <- var(c(data_r$logpk.R1[i],

❝                             data_r$logpk.R2[i]), na.rm = TRUE)

❝   }

❝   dfRR <- nrow(data_r) - 2

❝   s2wR <- mean(data_r$varR)

❝ }


I suggest to substitute the workaround to dinosaur method:
  sumsq <- 0
  for (Seq in unique(data_r$seq)) {
    CurrentData <- data_r$RR[data_r$seq == Seq]
    sumsq <- sumsq + sum((CurrentData-mean(CurrentData))^2)
  }
  NSeqs <- length(unique(data_r$seq))
  s2wR    <- sumsq/2/(nrow(data_r) - NSeqs) 
  dfRR    <- nrow(data_r) - NSeqs


at least it gives exactly the same results as classical one.
Yes, ABE is still under fire, the best approach you've found is here

Sorry, right now don't have a clue regarding differences with Winnonlin in RSABE part

Kind regards,
Mittyri

Complete thread:

UA Flag
Activity
 Admin contact
22,763 posts in 4,775 threads, 1,628 registered users;
9 visitors (0 registered, 9 guests [including 1 identified bots]).
Forum time: 09:19 CEST (Europe/Vienna)

The object of statistics is information.
The objective of statistics is the understanding of information
contained in data.    Irwin and Marylees Miller

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