bcov {brxx}R Documentation

bcov: Bayesian Estimation of the Variance Covariance Matrix

Description

This function estimates the variance covariance matrix for a

Usage

bcov(data, iter, burn, seed, CI, S0, nu0, mu0)

Arguments

data

N by P data matrix.

iter

Number of iterations for the Gibbs sampler.

burn

Number of samples to burn in.

seed

Seed for the Gibbs sampler

CI

Credible interval quantile, as a decimal (ie, for 95 percent, 0.95).

S0

Prior variance covariance matrix.

nu0

Prior degrees of freedom for inverse Wishart prior distribution.

mu0

Prior means for each column.

Value

Returns median posterior estimates of the variance covariance matrix.

Examples

## Not run: 
set.seed(999)
your_data=mvrnorm(n=15,mu=c(0,0),Sigma=matrix(c(4,3,3,9),nrow=2,ncol=2))
Mu0=c(0,0)
Sigma0=matrix(c(1,0.6,0.6,4),nrow=2,ncol=2)
Nu0=3-1
bcov(data=your_data,iter=5000,burn=2500,seed=999,CI=0.95,
    mu0=Mu0,S0=Sigma0,nu0=Nu0)
## End(Not run)


[Package brxx version 0.1.2 Index]