Skip to content
Prev 44075 / 398503 Next

gelman.diag question

Dear Friends,
I am trying to use the gelman-rubin convergence test. I generated a matrix
samp[10,000x86] with the gibbs sampler. the test requires the creation of
"mcmc" objects. Since I don't know how to define samp as a "mcmc" object, I
tried to create one mcmc object by means of the mcmc() function. With this
function I tried to create a mcmc object dul from samp but I got the message
below. What am I doing wrong?
[1] 10000    86
Error in data[1:nobs, , drop = FALSE] : incorrect number of dimensions

Then, as described below,I tried other way to create the mcmc object  but I
get the message "Error in gelman.diag(dul3) : You need at least two chains".
I think I am not understanding how the Gelman-Rubin test works in R. Could
you give me a small example.
[1] FALSE
[1] TRUE
Error in gelman.diag(dul3) : You need at least two chains

I really appreciate your patience, help, and time,
Jorge