Stata 15 help for bayes_mvreg

[BAYES] bayes: mvreg -- Bayesian multivariate regression


bayes [, bayesopts] : mvreg depvars = indepvars [if] [in] [weight] [, options]

options Description ------------------------------------------------------------------------- Model noconstant suppress constant term

Reporting display_options control spacing, line width, and base and empty cells

level(#) set credible level; default is level(95) ------------------------------------------------------------------------- indepvars may contain factor variables; see fvvarlist. fweights are allowed; see weight. bayes: mvreg, level() is equivalent to bayes, clevel(): mvreg. For a detailed description of options, see Options in [MV] mvreg.

bayesopts Description ------------------------------------------------------------------------- Priors * gibbs specify Gibbs sampling; available only with normal priors for regression coefficients and multivariate Jeffreys prior for covariance * normalprior(#) specify standard deviation of default normal priors for regression coefficients; default is normalprior(100) prior(priorspec) prior for model parameters; this option may be repeated dryrun show model summary without estimation

Simulation mcmcsize(#) MCMC sample size; default is mcmcsize(10000) burnin(#) burn-in period; default is burnin(2500) thinning(#) thinning interval; default is thinning(1) rseed(#) random-number seed exclude(paramref) specify model parameters to be excluded from the simulation results

Blocking * blocksize(#) maximum block size; default is blocksize(50) block(paramref[, blockopts]) specify a block of model parameters; this option may be repeated blocksummary display block summary * noblocking do not block parameters by default

Initialization initial(initspec) initial values for model parameters nomleinitial suppress the use of maximum likelihood estimates as starting values initrandom specify random initial values initsummary display initial values used for simulation * noisily display output from the estimation command during initialization

Adaptation adaptation(adaptopts) control the adaptive MCMC procedure scale(#) initial multiplier for scale factor; default is scale(2.38) covariance(cov) initial proposal covariance; default is the identity matrix

Reporting clevel(#) set credible interval level; default is clevel(95) hpd display HPD credible intervals instead of the default equal-tailed credible intervals eform[(string)] report exponentiated coefficients and, optionally, label as string batch(#) specify length of block for batch-means calculations; default is batch(0) saving(filename[, replace]) save simulation results to filename.dta nomodelsummary suppress model summary [no]dots suppress dots or display dots every 100 iterations and iteration numbers every 1,000 iterations; default is nodots dots(#[, every(#)]) display dots as simulation is performed [no]show(paramref) specify model parameters to be excluded from or included in the output notable suppress estimation table noheader suppress output header title(string) display string as title above the table of parameter estimates display_options control spacing, line width, and base and empty cells

Advanced search(search_options) control the search for feasible initial values corrlag(#) specify maximum autocorrelation lag; default varies corrtol(#) specify autocorrelation tolerance; default is corrtol(0.01) ------------------------------------------------------------------------- * Starred options are specific to the bayes prefix; other options are common between bayes and bayesmh. Options prior() and block() can be repeated. priorspec and paramref are defined in [BAYES] bayesmh. paramref may contain factor variables; see fvvarlist. See [BAYES] bayesian postestimation for features available after estimation. Model parameters are regression coefficients {depvar1:indepvars}, {depvar2:indepvars}, and so on, and covariance matrix {Sigma,matrix}. Use the dryrun option to see the definitions of model parameters prior to estimation. Multivariate Jeffreys prior, jeffreys(d), is used by default for the covariance matrix of dimension d. For a detailed description of bayesopts, see Options in [BAYES] bayes.


Statistics > Linear models and related > Bayesian regression > Multivariate regression


bayes: mvreg fits a Bayesian multivariate regression to multiple continuous outcomes; see [BAYES] bayes and [MV] mvreg for details.


Setup . sysuse auto

Fit Bayesian multivariate regression of headroom and turn on price and mpg . bayes: mvreg headroom turn = price mpg

Use Gibbs sampling instead of the default adaptive Metropolis-Hastings sampling and specify random-number seed for reproducibility . bayes, gibbs rseed(12345): mvreg headroom turn = price mpg

Same as above, but specify 90% highest posterior density (HPD) interval . bayes, gibbs rseed(12345) clevel(90) hpd: mvreg headroom turn = price mpg

Specify inverse-Wishart prior of dimension 2 with 30 degrees of freedom and scale matrix S for the covariance matrix instead of the default Jeffreys prior; increase the burn-in period to 5,000 from the default of 2,500 . matrix S = (0.8,0.5\0.5,10) . bayes, prior({Sigma,matrix}, iwishart(2,30,S)) burnin(5000): mvreg headroom turn = price mpg

Save MCMC results on replay . bayes, saving(mymcmc)

Stored results

See Stored results in [BAYES] bayesmh.

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index