Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mvnmvnp

Bayesian inference on a mutlivariate normal (MVN) mean with a multivariate normal (MVN) prior


Description

Evaluates posterior density for mu, the mean of a MVN distribution, with a MVN prior on mu

Usage

mvnmvnp(y, m0 = 0, V0 = 1, Sigma = NULL, ...)

Arguments

y

a vector of observations from a MVN distribution with unknown mean and known variance-covariance.

m0

the mean vector of the MVN prior, or a scalar constant so that the prior vector of length k with the same element repeated k times, e.g. m0 = 0

V0

the variance-covariance matrix of the MVN prior, or the diagonal of the variance-covariance matrix of the MVN prior, or a scalar constant, say n0, so the prior is n0 * I where I is the k by k identity matrix.

Sigma

the known variance covariance matrix of the data. If this value is NULL, which it is by default, then the sample covariance is used. NOTE: if this is the case then the cdf and quantile functions should really be multivariate t, but they are not - in which case the results are only (approximately) valid for large samples.

...

any other values to be passed to Bolstad.control

Value

A list will be returned with the following components:

mean

the posterior mean of the MVN posterior distribution

var

the posterior variance-covariance matrix of the MVN posterior distribution

cdf

a function that will evaluation the posterior cdf at a given point. This function calls mvtnmorm::pmvnorm.

quantile

a function that will find quantiles from the posterior given input probabilities. This function calls mvtnorm::qmvnorm.


Bolstad

Functions for Elementary Bayesian Inference

v0.2-41
GPL (>= 2)
Authors
James Curran [aut, cre]
Initial release
2020-09-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.