Use the MCMC to obtain estimate of parameters of a multivariate skew normal distribution.
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)
a matrix of observations with one subject per row.
mean vector of multivariate normal prior of the
parameter \(\mu\). The default value is NULL
. For the default,
the value will be generated automatically.
variance matrix of multivariate normal prior of
the parameter \(\mu\). The default value is NULL
. For the default,
the value will be generated automatically.
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.
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.
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.
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.
number of iterations. The default value is 10000.
number of burn-in. The default value is nmcmc
/10.
output every nthin
-th sample. The default value is 1 (no thinning).
random seed. The default value is 100.
a matrix of parameter \(\mu\) of the distribution, one row per iteration.
a three dimensional array of parameter \(\Sigma\) of the distribution. Sigma[i,,] is the result from the i-th iteration.
a matrix of diagonal elements of parameter \(D\) of the distribution, one row per iteration.
DIC value.
This function estimates the parameters of a multivariate skew normal distribution as in Sahu et al. 2003 using the MCMC.
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.
# 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)
# }
Run the code above in your browser using DataLab