histo                 package:rhosp                 R Documentation

_p_l_o_t _t_h_e _h_i_s_t_o_g_r_a_m _o_f _t_h_e _v_a_r_i_a_b_l_e _T

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

     plot of the random variable T and the equivalent function
     (t->CR*exp(-R*t)). in some cases, there are also plotted the
     theoretical and the De Vielder functions

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

     histo(X, disXi = NULL, disP = NULL, plotDV = FALSE)

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

       X: a list with the following components : T the observation of
          the random variable ; R the risk constant (estimated or
          theoretical calculated) ; CR the risk constand deduced from R
          ; lambdaEmp the estimation of the lambda of the De Vielder
          method (only available if DV=TRUE and if there is no problem
          with De Vielder method) ; muEmp the estimation of the mu of
          the De Vielder method (only available if DV=TRUE); lambdaHat
          the best estimation of lambda : the ESBVM of lambda ; muHat
          the best estimation of mu : the value of mu which maximize
          the loglikelihood (only available if the parametric
          estimation has been done)

   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: he 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 

  plotDV: a logical for : do you want to plot the De Vielder "function" 

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

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

     CJ

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

     #use mainSimul to make the first argument
     arg1Exp<-list(rangen=rexp,nbparam=1,param=list(1/3));
     arg1Bin<-list(rangen=rbinom,nbparam=2,param=list(1,1/20));
     arg1Unif<-list(rangen=runif,nbparam=2,param=list(0,20));
     arg1Lnorm<-list(rangen=rlnorm,nbparam=2,param=list(1/4,1));

     arg2Exp<-list(disfun=pexp,nbparam=1,param=list(1/5));
     arg2Cst<-list(disfun=pcst<-function(x,p) p ,nbparam=1,param=list(1/3));
     arg2Comp<-list(disfun=pcomp<-function(x,mu1,mu2,mu3){1-1/3*exp(-mu1* x)-1/2*exp(-mu2 *x)-1/6*exp(-mu3 *x)}
     ,nbparam=3,param=list(1/3,1/5,1/10));
     arg2Gamma<-list(disfun=pgamma,nbparam=2,param=list(3,1/3));
     arg2Lnorm<-list(disfun=plnorm,nbparam=2,param=list(1/20,2));

     T<-mainSimul(100,100,arg1Exp,arg2Exp)

     histo(T,arg1Exp,arg2Exp)

