Simulates realisations from the posterior distribution for the index and shape parameters in a gamma distribution based on a random sample and independent gamma priors by using a Metropolis within Gibbs algorithm and a normal random walk proposal for the index parameter

1 2 |

`N` |
length of MCMC chain |

`initial` |
starting value for the algorithm |

`innov` |
standard deviation of normal random walk innovation for index parameter |

`priorparam` |
prior parameters a,b,c,d |

`n` |
size of random sample |

`xbar` |
(arithmetic) mean of random sample |

`xgbar` |
geometric mean of random sample |

`show` |
logical. If true then acceptance rate for the proposals will be given |

1 | ```
mcmcAnalysis(mwgGamma(100,(0.62/0.4)^2,0.8,c(2,1,3,1),50,0.62,0.46),rows=2)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.