power.TOST.sim code [Outliers]

posted by mittyri  – Russia, 2023-10-31 16:40 (561 d 08:06 ago) – Posting: # 23770
Views: 5,085

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,424 posts in 4,927 threads, 1,670 registered users;
199 visitors (0 registered, 199 guests [including 10 identified bots]).
Forum time: 01:46 CEST (Europe/Vienna)

Only dead fish go with the current.    Scuba divers' proverb

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