challenge                package:mcsm                R Documentation

_S_l_i_c_e _s_a_m_p_l_e_r _a_n_a_l_y_s_i_s _o_f _t_h_e _c_h_a_l_l_e_n_g_e_r _d_a_t_a_s_e_t

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

     This function illustrates a slice sampling implementation of the
     simulation from the posterior distribution associated with a
     logistic regression model 

                   P(y=1|x)=exp(a+bx)/(1+exp(a+bx))

     when applied to the 'challenger' dataset.

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

     challenge(Nsim = 10^4)

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

    Nsim: Number of slice sampling iterations

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

     The output is a 'list' made of 

      a : Sequence of values of the intercept a produced by the slice
          sampler

      b : Sequence of values of the regression coefficient b produced
          by the slice sampler

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

     The function 'challenge' uses a function 'rtrun' that is
     replicated from a function used in the package 'bayesm'. In the
     current case, the simulation of the truncated normal distribution
     is done by a simple cdf inversion and may thus be  fragile in the
     tails.

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

     Christian P. Robert and George Casella

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

     Chapter 6 of *EnteR Monte Carlo Statistical Methods*

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

     challenger

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

     data(challenger)
     chares=challenge(10^4)
     plot(chares$a,chares$b,type="l",xlab="a",ylab="b",pch=19,cex=.4)

