covreg.mcmc {covreg}R Documentation

Bayesian estimation of the covariance regressioin model

Description

covreg.mcmc is used to estimate the parameters in the covariance regression model providing Bayesian estimates.

Usage

covreg.mcmc(fmean, fcov, data = NULL, R = 1, niter = 10000, 
nthin = 10, nsave = niter/nthin, verb = T)

Arguments

fmean

an object of class "formula", model for the mean regression.

fcov

an object of class "formula", model for the covariance regression. Can be different from the mean model.

data

data frame containing variables in the model.

R

a positive integer, rank of the model.

niter

number of MCMC iterations.

nthin

number of thinning.

nsave

number of output iterations, calualted as niter/nthin.

verb

print progress of MCMC(TRUE/FALSE).

Value

B1.psamp

an array containing the MCMC samples of the mean regression coefficients

B2.psamp

an array containing the MCMC samples of the covariance regression coefficients

A.psamp

an array containing the MCMC samples of the baseline covariance matrix

matrix.mean

the design matrix of the mean regression

matrix.cov

the design matrix of the covariance regression

Author(s)

Xiaoyue Niu and Peter Hoff

Examples

## 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)

[Package covreg version 1.0 Index]