R/rsu.sep.pass.R

Defines functions rsu.sep.pass

Documented in rsu.sep.pass

rsu.sep.pass <- function(N, n, step.p, pstar.c, p.inf.u, se.u){
  if(is.matrix(step.p)) {
    tmp <- apply(step.p, FUN = prod, MARGIN = 1)
  } else {
    tmp <- prod(step.p)   
  }
  se.c <- tmp * (1 - (1 - p.inf.u * se.u)^n)
  se.p <- 1 - (1 - se.c)^(pstar.c * N)
  
  return(list(se.p = se.p, se.c = se.c))
}

Try the epiR package in your browser

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

epiR documentation built on Nov. 20, 2023, 9:06 a.m.