Learn R Programming

miscF (version 0.1-5)

mvst.mcmc: Estimate Parameters of a Multivariate Skew t Distribution Using the MCMC

Description

Use the MCMC to obtain estimate of parameters of a multivariate skew t distribution.

Usage

mvst.mcmc(Y, prior.Mu0=NULL, prior.Sigma0=NULL, 
            prior.muDelta0=NULL, prior.sigmaDelta0=NULL, 
            prior.H0=NULL, prior.P0=NULL,
            nmcmc=10000, nburn=nmcmc/10, nthin=1, seed=1)

Arguments

Y

a matrix of observations with one subject per row.

prior.Mu0

mean vector of multivariate normal prior of the parameter \(\mu\). The default value is NULL. For the default, the value will be generated automatically.

prior.Sigma0

variance matrix of multivariate normal prior of the parameter \(\mu\). The default value is NULL. For the default, the value will be generated automatically.

prior.muDelta0

mean vector of normal prior of the diagonal elements of parameter \(D\). The default value is NULL. For the default, the value will be generated automatically.

prior.sigmaDelta0

standard deviation vector of normal prior of the diagonal elements of parameter \(D\). The default value is NULL. For the default, the value will be generated automatically.

prior.H0

the inverse of scale matrix of Wishart prior of the inverse of parameter \(\Sigma\). The default value is NULL. For the default, the value will be generated automatically.

prior.P0

the degrees of freedom of Wishart prior of the inverse of parameter \(\Sigma\). The default value is NULL. For the default, the value will be generated automatically.

nmcmc

number of iterations. The default value is 10000.

nburn

number of burn-in. The default value is nmcmc/10.

nthin

output every nthin-th sample. The default value is 1 (no thinning).

seed

random seed. The default value is 1. Note that seed can be an integer from 1 to 14. The internal state of the OpenBUGS random number generator can be set to one of 14 predefined states.

Value

Mu

a matrix of parameter \(\mu\) of the distribution, one row per iteration.

Sigma

a three dimensional array of parameter \(\Sigma\) of the distribution. Sigma[i,,] is the result from the i-th iteration.

Delta

a matrix of diagonal elements of parameter \(D\) of the distribution, one row per iteration.

nu

a vector of parameter \(\nu\) of the distribution.

DIC

DIC value.

Details

This function estimates the parameters of a multivariate skew t distribution as in Sahu et al. 2003 using the MCMC.

References

Sahu, Sujit K., Dipak K. Dey, and Marcia D. Branco. (2003) A new class of multivariate skew distributions with applications to Bayesian regression models. Canadian Journal of Statistics vol. 31, no. 2 129-150.

Examples

Run this code
# NOT RUN {
  Mu <- rep(0, 2)
  Sigma <- diag(c(1,1))
  D <- diag(c(1,1))
  nu <- 5
  Y <- rmvst(n=1000, D, Mu, Sigma, nu)
  mcmc <- mvst.mcmc(Y)
# }

Run the code above in your browser using DataLab