power.TOST.sim code [Outliers]

posted by mittyri – Russia, 2023-10-31 16:40 (121 d 06:05 ago) – Posting: # 23770
Views: 1,186

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,

Complete thread:

UA Flag
 Admin contact
22,916 posts in 4,807 threads, 1,645 registered users;
29 visitors (0 registered, 29 guests [including 7 identified bots]).
Forum time: 22:45 CET (Europe/Vienna)

Nothing shocks me. I’m a scientist.    Harrison Ford (as Indiana Jones)

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