power.TOST.sim code [Outliers]

posted by mittyri – Russia, 2023-10-31 16:40 (343 d 14:56 ago) – Posting: # 23770
Views: 3,129

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,249 posts in 4,885 threads, 1,653 registered users;
75 visitors (1 registered, 74 guests [including 8 identified bots]).
Forum time: 08:36 CEST (Europe/Vienna)

I have never in my life learned anything
from any man who agreed with me.    Dudley Field Malone

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