power.TOST.sim code [Outliers]

posted by mittyri – Russia, 2023-10-31 16:40 (265 d 10:07 ago) – Posting: # 23770
Views: 2,386

Dear BEQool!

❝ Distributions (both normal and log-normal) are determined by their mean and variance. As discussed above, in order to get power we need distribution of PE; the mean is of course PE but what about the variance? Is the variance of PE distribution MSE? Or something else?


I think it is better to look into the code

  # simulate point est. via normal distribution
  pes   <- rnorm(n=nsims, mean=diffm, sd=se.fac*sqrt(mse))
  # simulate mse via chi-squared distribution
  mses  <- mse*rchisq(n=nsims, df=df)/df


So the variance is calculated based on MSE, design constant and the number of subjects:
 
power.TOST.sim <- function(<...>) {
  <...>
  d.no  <- .design.no(design)
  <...>
  ades  <- .design.props(d.no)
  <...>
  nc <- sum(1/n)
  <...>
  se.fac <- sqrt(ades$bkni * nc)
  <...>
}

Kind regards,
Mittyri

Complete thread:

UA Flag
Activity
 Admin contact
23,113 posts in 4,858 threads, 1,644 registered users;
53 visitors (0 registered, 53 guests [including 12 identified bots]).
Forum time: 03:47 CEST (Europe/Vienna)

You can’t really say “similar” if it’s the same again you want.
“Similar” means something different.    Anthony Burgess

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