R statistics of Gelman et al

questions concerning analysis/theory using program MARK

R statistics of Gelman et al

Postby tomo_eguchi » Fri Jun 23, 2006 11:41 am

First of all, Gary, thank you so much for adding the Bayesian option in MARK. I hope to see more development in this direction!

I was playing with MCMC estimates and comparing them to MLE's. Then I found that many Rhat statistics were < 1, although not by much. I'm using closed model with recaptures only with 27 occasions. I ran four chains with 15000 steps within each chain. Everything else was left alone at their default values. I suppose it's possible to have more variance within a chain than between chains, but I think it's highly unlikely. I was wondering if there is a bug in computing the statistic.

Finally, it would be very nice if you could add an option to 'thin' each chain by a user-defined steps.

Thanks again for the great software,

Cheers,

Tomo Eguchi
tomo_eguchi
 
Posts: 9
Joined: Fri Feb 13, 2004 12:41 pm
Location: La Jolla, CA

Re: R statistics of Gelman et al

Postby cooch » Fri Jun 23, 2006 2:42 pm

tomo_eguchi wrote:First of all, Gary, thank you so much for adding the Bayesian option in MARK. I hope to see more development in this direction!

<snip>

Finally, it would be very nice if you could add an option to 'thin' each chain by a user-defined steps.i


At present, MARK dumps the Markov samples into a binary file called MCMC.BIN. In the MARK helpfile, there is a snippet of SAS code that will let you do simple 'descriptive statistics and plots' with the data contained in MCMC.BIN. If you know what you're doing, you can tweak this code to do the thinning you want. This is the philosophy Gary has taken with MARK in general - MARK generates the numbers - if you want to do further tweaking, thats up to you. Otherwise. Gary would spend all his time writing what would in effect be redundant to existing software, which is a waste of his time (and not in our colelctive best interests).

On the other hand, SAS does not currently have a built-in set of tools for evaluating various 'metrics' from the chains. Fortunately, [R] does, and is free as well (note - I refer to R as [R] - whoever called it R alone should be beaten :evil: - it makes searching for things related to R on the web a pain, since R could be a stats package, or it could be a variable name, or it could be just one letter in the alphabet. If it was called [R], there would be no confusion).

In [R], the two most commonly used packages for fiddling with Markov chains are CODA, and BOA. Each has relative strengths and weaknesses. I've written some [R] code that will parse the MCMC.BIN file, do a bunch of fiddling, then feed the output into one of these two [R] packages - for the moment, I have working [R] code that will take MCMC.BIN, thin it however you want, and dump everything into BOA (actually spawning the BOA menu to let you do all the things you want from a menu-driven application). The only limit to the code at present is it only handles a single chain (meaning, no fancy convergence diagnostics...yet). But, a modified script to handle multiple chains isn't far away. I know how to do it, just haven't had any time.

Ultimately, Gary will distribute the [R] script with the MARK helpfile. In the interim, if you want a copy of the working version (with the promise that you won't complain if it doesn't work exactly as you want at present), send me a private note.
cooch
 
Posts: 1654
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest

cron