a bit corrected workaround [RSABE / ABEL]
Hi Helmut!
I suggest to substitute the workaround to dinosaur method:
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
❝ 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
Kind regards,
Mittyri
Complete thread:
- any SAS or R-macro for 3 period two sequence RSABEIs Achievwin 2023-07-05 18:38 [RSABE / ABEL]
- Use the one for TRTR | RTRT Helmut 2023-07-06 08:46
- RSABE R coded by Detlew mittyri 2023-07-06 14:07
- ‘dlat’ for 3-period full replicate? Helmut 2023-07-07 14:41
- ‘dlat’ for 3-period full replicate? mittyri 2023-07-07 16:04
- Likely wrong workaround? Helmut 2023-07-07 20:06
- a bit corrected workaroundmittyri 2023-07-07 22:52
- THX! Another attempt… Helmut 2023-07-08 12:15
- complete.cases for dlat and ilat? mittyri 2023-07-09 21:45
- a bit corrected workaround Achievwin 2023-07-10 20:43
- THX! Another attempt… Helmut 2023-07-08 12:15
- a bit corrected workaroundmittyri 2023-07-07 22:52
- Likely wrong workaround? Helmut 2023-07-07 20:06
- ‘dlat’ for 3-period full replicate? mittyri 2023-07-07 16:04
- ‘dlat’ for 3-period full replicate? Helmut 2023-07-07 14:41
- RSABE R coded by Detlew mittyri 2023-07-06 14:07
- Use the one for TRTR | RTRT Helmut 2023-07-06 08:46