blinregpred            package:LearnBayes            R Documentation

_S_i_m_u_l_a_t_e_s _v_a_l_u_e_s _o_f _p_r_e_d_i_c_t_e_d _r_e_s_p_o_n_s_e _f_o_r _l_i_n_e_a_r _r_e_g_r_e_s_s_i_o_n _m_o_d_e_l

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

     Simulates draws of the predictive distribution of a future
     response for a linear regression model with a noninformative prior

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

     blinregpred(X1,theta.sample)

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

      X1: matrix where each row corresponds to a covariate set

theta.sample: list with components beta, matrix of simulated draws of
          regression vector, and sigma, vector of simulated draws of
          sampling error standard deviation

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

     matrix where a column corresponds to the simulated draws of the
     predicted response for a given covariate set

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

     Jim Albert

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

     chirps=c(20,16.0,19.8,18.4,17.1,15.5,14.7,17.1,15.4,16.2,15,17.2,16,17,14.1)
     temp=c(88.6,71.6,93.3,84.3,80.6,75.2,69.7,82,69.4,83.3,78.6,82.6,80.6,83.5,76.3)
     X=cbind(1,chirps)
     m=1000
     theta.sample=blinreg(temp,X,m)
     covset1=c(1,15)
     covset2=c(1,20)
     X1=rbind(covset1,covset2)
     blinregpred(X1,theta.sample)

