mvsn.mcmc: Estimate Parameters of a Multivariate Skew Normal...

Description Usage Arguments Details Value References Examples

View source: R/mvsn.mcmc.R

Description

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

Usage

1
2
3
4
  mvsn.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=100)

Arguments

Y

a matrix of observations with one subject per row.

prior.Mu0

mean vector of multivariate normal prior of the parameter μ. 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 μ. 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 Σ. 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 Σ. 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 100.

Details

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

Value

Mu

a matrix of parameter μ of the distribution, one row per iteration.

Sigma

a three dimensional array of parameter Σ 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.

DIC

DIC value.

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

1
2
3
4
5
6
7
8
## Not run: 
  Mu <- rep(400, 2)
  Sigma <- diag(c(40, 40))
  D <- diag(c(-30, -30))
  Y <- rmvsn(n=1000, D, Mu, Sigma)
  mcmc <- mvsn.mcmc(Y)

## End(Not run)

miscF documentation built on April 14, 2020, 7:01 p.m.

Related to mvsn.mcmc in miscF...