eigenmodel_mcmc          package:eigenmodel          R Documentation

_A_p_p_r_o_x_i_m_a_t_e _t_h_e _p_o_s_t_e_r_i_o_r _d_i_s_t_r_i_b_u_t_i_o_n _o_f _p_a_r_a_m_e_t_e_r_s _i_n _a_n _e_i_g_e_n_m_o_d_e_l

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

     Construct approximate samples from the posterior distribution of 
     the parameters and latent variables in an eigenmodel for 
     symmetric relational data.

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

     eigenmodel_mcmc(Y, X = NULL, R = 2, S = 1000, seed = 1, Nss = min(S-burn, 1000), burn = 0)

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

       Y: an n x n symmetric matrix with missing  diagonal entries.
          Off-diagonal missing values are allowed.  

       X: an n x n x p array of regressors 

       R: the rank of the approximating factor matrix  

       S: number of samples from the Markov chain

    seed: a random seed

     Nss: number of samples to be saved 

    burn: number of initial scans  of the Markov chain to be dropped

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

     a list with  the following components:  

Z_postmean: posterior mean of the latent variable in the probit 
          specification

ULU_postmean: posterior mean of the reduced-rank approximating matrix

Y_postmean: the original data matrix with missing values replaced  by
          posterior means

L_postsamp: samples of the  eigenvalues

b_postsamp: samples of the regression coefficients

       Y: original data matrix

       X: original regressor array

       S: number of scans of the Markov chain

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

     Peter Hoff

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

     data(YX_Friend)

     fit<-eigenmodel_mcmc(Y=YX_Friend$Y,X=YX_Friend$X,R=2,S=750,burn=250)

     # in general you  should run the Markov chain longer than 750 scans

     plot(fit)

     #fit<-eigenmodel_mcmc(Y=Y_Gen,R=3,S=10000)

     #fit<-eigenmodel_mcmc(Y=Y_Pro,R=3,S=10000)

