[R] MCMCpack gelman.plot and gelman.diag

sung-youn.kim@stonybrook.edu sung-youn.kim at stonybrook.edu
Fri Apr 18 21:02:50 CEST 2003


Hi, 

A question. When I run gelman.diag and gelman.plot
with mcmc lists obtained from MCMCregress, the results are following.  

> post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+         thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA,
+         b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) 
> post1.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+         thin = 10, verbose = FALSE, beta.start = -3, sigma2.start = NA,
+         b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) 
> post2.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+         thin = 10, verbose = FALSE, beta.start = 3, sigma2.start = NA,
+         b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) 
> post.R.all <- mcmc.list(post.R, post1.R, post2.R)
> gelman.diag(post.R.all, confidence = 0.95, transform=FALSE)
Potential scale reduction factors:

     Point est. 97.5% quantile
[1,]        NaN            NaN
[2,]        NaN            NaN
[3,]        NaN            NaN
[4,]        NaN            NaN

Multivariate psrf

1
> gelman.plot(post.R.all, bin.width = 20, max.bins = 100, confidence = 0.95, transform = FALSE, auto.layout = TRUE, ask = FALSE)

******* Error: *******
Cannot compute Gelman & Rubin's diagnostic for any chain 
segments for variables (Intercept) Age Status sigma2 
This indicates convergence failure
 

Should I have run them with more chains? Any hint?

thanks in advance,

-- 
Sung-youn Kim
--------------
Dept. of Political Science
Stony Brook University (SUNY at Stony Brook)
Office: (631)-632-7664
Web: http://www.ic.sunysb.edu/www/stu/sungyoki



More information about the R-help mailing list