ANALYSIS OF RAT TUMOUR DATA USING MATLAB

The model:

MATLAB m-file to do the analysis
MATLAB function to compute the log posterior of (log(alpha/beta), log(alpha+beta))
MATLAB function to simulated from a discrete distribution
(Also need functions from MATLAB statistics toolbox.)

SUMMARIZING THE POSTERIOR DISTRIBUTION:

Compute the marginal posterior density of (log(alpha/beta), log(alpha+beta)) on a 50 by 50 grid.

Take a simulated sample from the discrete posterior distribution of (log(alpha/beta), log(alpha+beta)).

Transform the above simulated values to get a sample from the posterior distribution of (alpha, beta).

Simulate values of the theta(i) from beta distributions. Summarize the posterior distribution of each theta(i) with a median and a 95% credible interval. Graph the set of posterior distributions using errobars.