betagen                 package:mcsm                 R Documentation

_P_l_o_t _e_x_p_l_a_i_n_i_n_g _a_c_c_e_p_t-_r_e_j_e_c_t _o_n _a _B_e_t_a(_2._7,_6._3) _t_a_r_g_e_t

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

     This function of Nsim represents Nsim points simulated from either
     a uniform or a Beta(2,6) proposal in terms of their location above
     versus below the density of the Beta(2.7,6.3) target in order to
     explain accept-reject methods.

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

     betagen(Nsim = 10^3)

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

    Nsim: Number of points to be represented on the subgraph, the
          default value being 10^3

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

     The R code can be modified for further use, but note that the
     bounds 'M' in the program are hardcoded towards the current values
     of a and b.

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

     The function returns a graph, either on an existing graphical
     window or by creating a new graphical window, with two plots
     side-by-side.

_W_a_r_n_i_n_g:

     This function is only intended to illustrate the principle at work
     behind accept-reject. For Beta simulation, use 'rbeta'.

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

     Christian P. Robert and George Casella

_R_e_f_e_r_e_n_c_e_s:

     Chapter 3 of *EnteR Monte Carlo Statistical Methods*

_S_e_e _A_l_s_o:

     rbeta

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

     betagen(Nsim=10^4)

