Description Usage Arguments Details Value Note References Examples

Estimate the parameters of a multivariate normal model under different priors.

1 |

`X` |
a matrix of observations with one subject per row. |

`nsim` |
number of simulations. |

`prior` |
a character string specifying the prior distribution. It must be either "Jeffreys" or "Conjugate" and may be abbreviated. The default is "Jeffreys". |

Both the Jeffreys prior and normal-inverse-Wishart conjugate prior are available. The conjugate prior of variance covariance matrix is inverse-Wishart. To use a noninformative proper prior, the degree of freedom of Wishart prior was set as the number of dimensions and the scale matrix was chosen based on the unbiased estimate. The number of prior measurements was taken as one and the prior mean was set as its unbiased estimate.

`Mu.save` |
a matrix of mean vector of the model, one row per iteration. |

`Sigma.save` |
a three dimensional array of variance of the model. Sigma.save[,,i] is the result from the ith iteration. |

When the number of dimensions is two, under Jeffreys prior, it is straightforward to obtain independent samples from the posteriors.

Berger, J. O., Sun, D. (2008)
Objective Priors for the Bivariate Normal Model.
*The Annals of Statistics* **36** 963-982.

Gelman, A., Carlin, J. B., Stern, H. S., Rubin, D. B. (2003) Bayesian Data Analysis. 2nd ed. London: Chapman and Hall

Sun, D., Berger, J. O. (2009) Objective Priors for the Multivariate Normal Model. In Bayesian Statistics 8, Ed. J. Bernardo, M. Bayarri, J. Berger, A. Dawid, D. Heckerman, A. Smith and M. West. Oxford: Oxford University Press.

1 2 3 4 5 6 7 |

```
Loading required package: MCMCpack
Loading required package: coda
Loading required package: MASS
##
## Markov Chain Monte Carlo Package (MCMCpack)
## Copyright (C) 2003-2017 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##
Loading required package: mvtnorm
Loading required package: Rcpp
Loading required package: RcppArmadillo
```

miscF documentation built on Feb. 17, 2018, 1:01 a.m.

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.