Description Usage Arguments Value Author(s) Examples
make a sample of the first model, that is to say simulate the sequence of the random variables Xi (stay duration) the sequence of Yi (exposure time) and the sequence of Zi (side effect reporting)
1 | makeSample2(file, nbPatient, disXi, disYi)
|
file |
the filename in which the simulation will be stored |
nbPatient |
the number of patients for the simulation |
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 stands for a random positive variable generator ; nbparam for number of parameter of this distribution and param for a list of parameters |
a NULL object.
Christophe Dutang and Julie Barthes
1 2 3 4 5 6 7 8 9 10 11 | 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));
makeSample2("thedata.rda",200,arg1ExpMod2,arg2ExpMod2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.