Stata 15 help for bayes_heckprobit

[BAYES] bayes: heckprobit -- Bayesian probit model with sample selection

Syntax

bayes [, bayesopts] : heckprobit depvar indepvars [if] [in] [weight], select([depvar_s =] varlist_s [, noconstant offset( varname_o)]) [options]

options Description ------------------------------------------------------------------------- Model * select() specify selection equation: dependent and independent variables; whether to have constant term and offset variable noconstant suppress constant term offset(varname) include varname in model with coefficient constrained to 1 collinear keep collinear variables

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

level(#) set credible level; default is level(95) ------------------------------------------------------------------------- * select() is required. The full specification is select([depvar_s =] varlist_s [, noconstant offset(varname_o)]). indepvars and varlist_s may contain factor variables; see fvvarlist. depvar, indepvars, varlist_s, and depvar_s may contain time-series operators; see tsvarlist. fweights are allowed; see weight. bayes: heckprobit, level() is equivalent to bayes, clevel(): heckprobit. For a detailed description of options, see Options in [R] heckprobit.

bayesopts Description ------------------------------------------------------------------------- Priors * 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 {depvar:indepvars} for the main regression and {select:varlist_s} for the selection equation, and atanh-transformed correlation {athrho}. Use the dryrun option to see the definitions of model parameters prior to estimation. For a detailed description of bayesopts, see Options in [BAYES] bayes.

Menu

Statistics > Binary outcomes > Bayesian regression > Probit model with sample selection

Description

bayes: heckprobit fits a Bayesian sample-selection probit regression to a partially observed binary outcome; see [BAYES] bayes and [R] heckprobit for details.

Examples

Setup . webuse school

Fit Bayesian probit model with sample selection using default priors . bayes: heckprobit private years logptax, sel(vote=years loginc logptax)

Check MCMC convergence for {athrho} . bayesgraph diagnostics {athrho}

Increase the burn-in period to 5,000 from the default of 2,500 and specify a more informative normal prior with zero mean and variance of 10 for athrho . bayes, burnin(5000) prior({athrho}, normal(0,10)): heckprobit private years logptax, sel(vote=years loginc logptax)

MCMC diagnostics for {athrho} look better . bayesgraph diagnostics {athrho}

Calculate posterior summaries for rho by inverse-transforming the model parameter {athrho} . bayesstats summary (rho:1-2/(exp(2*{athrho})+1))

Use standard deviation of 10 of the default normal prior for all model parameters, specify random-number seed for reproducibility, and display dots during simulation . bayes, normalprior(10) rseed(12345) dots: heckprobit private years logptax, sel(vote=years loginc logptax)

Fit Bayesian probit selection model using uniform priors for all regression coefficients in the main equation and for {athrho} . bayes, prior({private:years logptax _cons} {athrho}, uniform(-5,5)): heckprobit private years logptax, sel(vote=years loginc logptax)

Same as above, but use a shortcut notation to refer to all regression coefficients in the main equation . bayes, prior({private:} {athrho}, uniform(-5,5)): heckprobit private years logptax, sel(vote=years loginc logptax)

As above, but use another uniform prior for all regression coefficients in the selection equation . bayes, prior({private:} {athrho}, uniform(-5,5)) prior({vote:}, uniform(-10,10)): heckprobit private years logptax, sel(vote=years loginc logptax)

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