mainSimul2 {rhosp} | R Documentation |
simulate many times the second model
Description
main simulates nbBed times the second model with the function simul
Usage
mainSimul2(nbBed, nbPatient, disXi, disYi, toplot = FALSE)
Arguments
nbBed |
the number of beds |
nbPatient |
the number of patient in each bed |
disXi |
the distribution of the variable Xi : disXi is a 3 elements list : rangen stands for a random positive variable generator ; nbparam for number of parameter of this distribution and param for a list of parameters |
disYi |
the distribution of the variable Yi : disYi is a 3 elements list : rangen for a random positive variable generator ; nbparam for number of parameter of this distribution and param for a list of parameters |
toplot |
a logical variable to plot the variable Zi |
Details
If necessary, more details than the description above
Value
return a list of the following components
T |
T the vector of durations between two declared side effects |
R |
R a risk constant |
CR |
CR a risk constant |
Author(s)
Christophe Dutang and Julie Barthes
Examples
arg1ExpMod2 <- list(rangen=rexp,nbparam=1,param=list(1/2));
arg1BinMod2 <- list(rangen=rbinom,nbparam=2,param=list(1,1/20));
arg1UnifMod2 <- list(rangen=runif,nbparam=2,param=list(0,20));
arg1LnormMod2 <- list(rangen=rlnorm,nbparam=2,param=list(1/4,1));
arg2ExpMod2 <- list(rangen=rexp,nbparam=1,param=list(1/5));
# arg2-cst <- list(rangen=pcst <- function(x,p) p ,nbparam=1,param=list(1/10));
arg2GammaMod2 <- list(rangen=rgamma,nbparam=2,param=list(3,1/5));
T <- mainSimul2(100,100,arg1ExpMod2,arg2ExpMod2)