power.TOST.sim code [Outliers]

posted by mittyri – Russia, 2023-10-31 16:40 (28 d 16:20 ago) – Posting: # 23770
Views: 580

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
22,811 posts in 4,783 threads, 1,642 registered users;
16 visitors (0 registered, 16 guests [including 10 identified bots]).
Forum time: 09:01 CET (Europe/Vienna)

Every man gets a narrower and narrower field of knowledge
in which he must be an expert in order to compete with other people.
The specialist knows more and more about less and less
and finally knows everything about nothing.    Konrad Lorenz

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