mainSimul2               package:rhosp               R Documentation

_s_i_m_u_l_a_t_e _m_a_n_y _t_i_m_e_s _t_h_e _s_e_c_o_n_d _m_o_d_e_l

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

     main simulates nbBed times the second model with the function
     simul

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

     mainSimul2(nbBed, nbPatient, disXi, disYi, toplot = FALSE)

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

   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 <=>  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 

  toplot: a logical variable to plot the variable Zi 

_D_e_t_a_i_l_s:

     If necessary, more details than the description  above

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

     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

_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));

     T<-mainSimul2(100,100,arg1ExpMod2,arg2ExpMod2)

