data(ais, package="sn") ##Australian Institute of Sport data set
attach(ais)
##It is considered a bivariate regression model
##with Hg and SSF as response variables and
##Hc, Fe, Bfat and LBM as covariates
y<-cbind(Hg,SSF)
n<-nrow(y); m<-ncol(y)
X.aux=model.matrix(~Hc+Fe+Bfat+LBM)
p<-ncol(X.aux)
X<-array(0,dim=c(2*p,m,n))
for(i in 1:n) {
X[1:p,1,i]=X.aux[i,,drop=FALSE]
X[p+1:p,2,i]=X.aux[i,,drop=FALSE]
}
##See the covariate matrix X
##X
# \donttest{
fit.MN=estimate.MN(y, X) #fit the MN distribution
vcov(fit.MN) #variance-covariance matrix
fit.MSN=estimate.MSN(y, X) #fit the MSN distribution
vcov(fit.MSN) #variance-covariance matrix
# }
Run the code above in your browser using DataLab