logisticpost           package:LearnBayes           R Documentation

_L_o_g _p_o_s_t_e_r_i_o_r _f_o_r _a _b_i_n_a_r_y _r_e_s_p_o_n_s_e _m_o_d_e_l _w_i_t_h _a _l_o_g_i_s_t_i_c _l_i_n_k _a_n_d _a _u_n_i_f_o_r_m _p_r_i_o_r

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

     Computes the log posterior density of (beta0, beta1)  when yi are
     independent binomial(ni, pi) and logit(pi)=beta0+beta1*xi and a
     uniform prior is placed on (beta0, beta1)

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

     logisticpost(beta,data)

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

    beta: matrix of parameter values where each row represents a value
          of (beta0, beta1)

    data: matrix of columns of covariate values x, sample sizes n, and
          number of successes y

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

     vector of values of the log posterior where each value corresponds
     to each row of the parameters in beta

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

     Jim Albert

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

     x = c(-0.86,-0.3,-0.05,0.73)
     n = c(5,5,5,5)
     y = c(0,1,3,5)
     data = cbind(x, n, y)
     beta1=c(0,0)
     beta2=c(2,10)
     beta=rbind(beta1,beta2)
     logisticpost(beta,data)

