makeSample2              package:rhosp              R Documentation

_c_r_e_a_t_e _a _s_a_m_p_l_e _o_f _t_h_e _s_e_c_o_n_d _m_o_d_e_l _s_t_o_r_e_d _i_n _a _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     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)

_U_s_a_g_e:

     makeSample2(file, nbPatient, disXi, disYi)

_A_r_g_u_m_e_n_t_s:

    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 

   disYi: the distribution of the variable Yi : disYi is a 3 elements
          list : rangen <=>  a random positive variable generator ;
          nbparam <=> number of parameter of this distribution and
          param <=> a list of parameters 

_V_a_l_u_e:

_A_u_t_h_o_r(_s):

     CJ

_E_x_a_m_p_l_e_s:

     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)

