A simultaneous regression model for the mean and covariance

Description

This package fits a simultaneous regression model for the mean vectors and covariance matrices of multivariate response variables, as described in Hoff and Niu (2012). The explanatory variables can be continuous or discrete. The current version of the package provides the Bayesian estimates.

Details

This package fits a simultaneous regression model for the mean vectors and covariance matrices of multivariate response variables, as described in Hoff and Niu (2012). The explanatory variables can be continuous or discrete. The current version of the package provides the Bayesian estimates.

Author(s)

Xiaoyue Niu and Peter Hoff

References

P.D. Hoff and X. Niu. A Covariance Regression Model. Statistica Sinica, 22:729-753, 2012

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## load FEV data ##
data(fev)
## specify mean and cov models ##
library(splines)
fmean=as.formula(cbind(fev,height)~bs(age,knots=11))
fcov=as.formula(cbind(fev,height)~sqrt(age)+age)
## fit model ##
fit<-covreg.mcmc(fmean,fcov,data=fev,R=2,niter=100,nthin=1)
## summarize MCMC samples ##
M.psamp=m.psamp(fit)
S.psamp=cov.psamp(fit)