R/Vaccine.CEM.R

Defines functions Vaccine.CEM

Documented in Vaccine.CEM

Vaccine.CEM <-
function(alpha,beta,mu_t,mu_c,sigma_t,sigma_c,pt,pc){

mu_star=(mu_t+mu_c)/2
p_star=(pt+pc)/2

n=(1/(mu_t*pt-mu_c*pc)^2)*(qnorm(1-alpha/2)*sqrt(2*mu_star^2*(p_star*(1-p_star))+2*p_star*(sigma_t^2+sigma_c^2))
+qnorm(1-beta)*sqrt(pt*(sigma_t^2+mu_t^2*(1-pt))+pc*(sigma_c^2+mu_c^2*(1-pc))))^2

}

Try the TrialSize package in your browser

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

TrialSize documentation built on May 30, 2017, 7:18 a.m.