postsim                  package:rv                  R Documentation

_G_e_n_e_r_a_t_e _P_o_s_t_e_r_i_o_r _S_i_m_u_l_a_t_i_o_n_s _f_o_r _l_m _o_r _g_l_m _O_b_j_e_c_t_s

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

     Generate posterior simulations for a given fitted linear or
     general linear model, assuming the standard "noninformative"
     priors on the unknowns.

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

       postsim(fit)
       ## S3 method for class 'lm':
       postsim(fit)
       ## S3 method for class 'glm':
       postsim(fit)

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

     fit: an lm or glm object

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

     A (named) random vector for each fitted coefficient.

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

     Jouni Kerman kerman@stat.columbia.edu <URL:
     http://www.stat.columbia.edu/~kerman>

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

     Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing
     Posterior Simulations Using Random Variable Objects. Technical
     report, Columbia University, New York.

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

       x <- 1:20
       y <- rnorm(length(x), mean=x, sd=10)
       print(summary(lm.fit <- lm(y ~ x)))
       random.estimates <- postsim(lm.fit)

