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{
##Select a distribution within the MSMN class. Then, perform covariate
##selection based on the significance
fit.MSMN=choose2(y, X, class="MSMN")
summary(fit.MSMN)
##Identical process within the MSSMN class.
##may take some time on some systems
fit.MSSMN=choose2(y, X, class="MSSMN")
summary(fit.MSSMN)
# }
Run the code above in your browser using DataLab