eigenmodel_mcmc {eigenmodel} | R Documentation |
Construct approximate samples from the posterior distribution of the parameters and latent variables in an eigenmodel for symmetric relational data.
eigenmodel_mcmc(Y, X = NULL, R = 2, S = 1000, seed = 1, Nss = min(S-burn, 1000), burn = 0)
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 |
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 |
Peter Hoff
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)