ei.reg.bayes             package:eiPack             R Documentation

_E_c_o_l_o_g_i_c_a_l _r_e_g_r_e_s_s_i_o_n _u_s_i_n_g _B_a_y_e_s_i_a_n _N_o_r_m_a_l _r_e_g_r_e_s_s_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Estimate an ecological regression using Bayesian normal 
     regression.

_U_s_a_g_e:

     ei.reg.bayes(formula, data, sample = 1000, weights = NULL, truncate=FALSE)

_A_r_g_u_m_e_n_t_s:

 formula: An R formula object of the form 'cbind(c1, c2, ...) ~
          cbind(r1, r2, ...)'

    data: data frame containing the variables specified in formula

  sample: number of draws from the posterior

 weights: a vector of weights

truncate: if TRUE, imposes a proper uniform prior on the unit hypercube
          for the coefficients; if FALSE, an improper uniform prior is
          assumed

_D_e_t_a_i_l_s:

     For i in 1,...,C, C Bayesian regressions of the form 'c_i ~
     cbind(r1, r2, ...)' are performed.  See the documentation for
     'ei.reg' for the accounting identities and constancy assumption
     underlying this Bayesian linear model.

     The sampling density is given by 

              y| beta, sigma^2, X ~ N(X beta, sigma^2*I)


     The improper prior is p(beta,sigma^2|X) proportional to 1/sigma^2.

     The proper prior is p(beta, sigma^2|x) proportional to I(beta in
     [0,1])* 1/sigma^2.

_V_a_l_u_e:

     A list containing  

    call: the call to 'ei.reg.bayes'

   draws: A, R x C x sample array containing posterior draws for each
          population cell fraction

_A_u_t_h_o_r(_s):

     Olivia Lau <olivia.lau@post.harvard.edu> and Ryan T. Moore
     <rtm@wustl.edu>

_R_e_f_e_r_e_n_c_e_s:

     Leo Goodman. 1953. ``Ecological Regressions and the Behavior of
     Individuals.'' _American Sociological Review_ 18:663-664.

