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

posted by KDA – India, 2019-01-23 04:24  – Posting: # 19800
Views: 2,401

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
 Mix view
Bioequivalence and Bioavailability Forum |  Admin contact
19,478 posts in 4,133 threads, 1,333 registered users;
online 11 (0 registered, 11 guests [including 9 identified bots]).
Forum time (Europe/Vienna): 04:54 CEST

If you don’t know anything about computers,
just remember that they are machines that do exactly what you tell them
but often surprise you in the result.    Richard Dawkins

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
HTML5