makeSample {rhosp} | R Documentation |
make a sample of the first model, that is to say simulate the sequence of the random variables Xi (stay duration) and the sequence of Zi (side effect reporting)
makeSample(file, nbPatient, disXi, disP)
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 <=> a random positive variable generator ; nbparam <=> number of parameter of this distribution and param <=> a list of parameters |
disP |
the side effect probability (success probability of Zi) p : disP is a 3 elements list : disfun <=> a distribution function ; nbparam <=> number of parameter of this distribution and param <=> a list of parameters |
CJ
arg1Exp<-list(rangen=rexp,nbparam=1,param=list(1/3)); arg2Exp<-list(disfun=pexp,nbparam=1,param=list(1/5)); makeSample("mydata.rda",200,arg1Exp,arg2Exp)