R-Code for Power in 2×2 Cross-over [R for BE/BA]

posted by KDA – India, 2019-01-23 04:24 (681 d 19:51 ago) – Posting: # 19800
Views: 8,427

Dear all,

I am a amateur in BA/BE area and trying to learn from this forum. I would appreciate if anyone kindly answer few of my queries for the r-code used to reproduce Fig.1c by Diletti et al. (1991).

Q1) If it is 2x2 cross-over study, test and ref drug would be given only once. Can we get true intra-subject co-efficient of variance (CV)from 2x2 cross-over study?

Q2) If it is possible to calculate the intra-subject co-efficient of variance (CV)from 2x2 cross-over study, is this value coming from ref drug only?

Q3) What is the equation for calculating this intra-subject co-efficient of variance (CV)?

Q4) In the equation "s = sqrt(2)*sigmaW", what 's' stands for? why '2' is square-rooted?

Q5) I have used the following r-code for calculating point estimate and CI limit of AUC.

  A1 <- data$AUC[which(data$TRT=="R1" & data$PER==1)]
  B2 <- data$AUC[which(data$TRT=="R2" & data$PER==2)]
  B1 <- data$AUC[which(data$TRT=="R2" & data$PER==1)]
  A2 <- data$AUC[which(data$TRT=="R1" & data$PER==2)]
 
  AB <- log(B2)-log(A1)
  BA <- log(B1)-log(A2)
  n1 <- length(AB)
  mAB <- mean(AB)
  vAB <- var(AB)
  n2 <- length(BA)
  mBA <- mean(BA)
  vBA <- var(BA)
  mD <- mean(log(c(B1,B2))) - mean(log(c(A1,A2)))
  MSE <- (((n1-1)*vAB + (n2-1)*vBA)/(n1+n2-2))/2
  alpha <- 0.05
 
  lo <- mD - qt(1-alpha,n1+n2-2)*sqrt(MSE)*sqrt((1/(2*n1) + 1/(2*n2)))
  hi <- mD + qt(1-alpha,n1+n2-2)*sqrt(MSE)*sqrt((1/(2*n1) + 1/(2*n2))
 
  PE <- 100*exp(mD)
  90_CI_Lower <- 100*exp(lo)
  90_CI_Higher <- 100*exp(hi)

  SE <- sqrt(MSE)*sqrt((1/(2*n1) + 1/(2*n2)))
  SD <- sqrt(MSE)


Can I calculate CV by the following equation?

CV=SD/(exp(mD))

Based on my understanding, this my calculated CV is not the same as the 'CV' that represent intra-subject co-efficient of variance used to reproduce Fig.1c by Diletti et al. (1991)

what code/formula should I use if I want to calculate intra-subject co-efficient of variance?


Regards
KDA

Complete thread:

Activity
 Admin contact
21,240 posts in 4,431 threads, 1,482 registered users;
online 2 (0 registered, 2 guests [including 0 identified bots]).
Forum time: Saturday 00:15 CET (Europe/Vienna)

I believe there is no philosophical high-road in science,
with epistemological signposts. No, we are in a jungle
and find our way by trial and error,
building our road behind us as we proceed.    Max Born

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