R/tune_mu_sigma.R

Defines functions tune_mu_sigma

tune_mu_sigma <- function(p, c) {

  actual <- actual_values(p = p, c = c, fc = 1)
  fc     <- 1.0

  while (abs(actual$c_actual - c) > 0.0025) {

    fc <- fc+0.01
    actual <- actual_values(p = p, c = c, fc = fc)

  }

  out <- list("p_actual" = actual$p_actual,
              "c_actual" = actual$c_actual,
              "mu" = actual$mu,
              "sigma" = actual$sigma,
              "fc" = fc)
  return(out)
}

#system.time(a<-tune_mu_sigma(0.25,0.81))
#a

Try the sampsizeval package in your browser

Any scripts or data that you put into this service are public.

sampsizeval documentation built on May 28, 2021, 9:06 a.m.