srtbayes -- Bayesian Effect Size calculation for Simple Randomised Trials

Syntax

srtbayes varlist, intervention(interv_var) [options]

main

intervention() requires a factor variable identifying the intervention (arms) of the trial.

Model
* additional Bayesian arguments to be passed to the command. Stata defaults apply.

Reporting
threshold(#) a real scalar or vector of threshold(s) for estimating Bayesian posterior probability.

sepchains stores summary statistics for each chain.

diagnostics generates convergence diagnostic graphs.

noisily displays regression output.

save saves the simulation output.

cond() wrapper for bayesian arguments specified only for the conditional model.

uncond() wrapper for bayesian arguments specified only for the unconditional model.

varlist and intervention() may contain factor-variable operators; see fvvarlist.

Description

srtbayes performs Effect Size (ES) calculation of educational trials under the assumption of independent errors among pupils under a Bayesian framework;
this can also be used with schools as fixed effects. This analysis produces ES estimates for both conditional and unconditional model specifications.

Options

Model

* Additional Bayesian arguments to be passed to the command such as mcmcsize(#) burnin(#) rseed(#) nchains(#) and custom priors.
Stata defaults of Bayesian regression models apply; see bayes prefix ([BAYES] bayes).

Reporting

threshold(#) A real scalar or vector for estimating Bayesian posterior probability such that the observed effect size is greater than or equal to the threshold(s).

sepchains Stores summary statistics for each number of chains specified in nchains(#).

diagnostics Generates convergence diagnostic graphs for each number of chains specified in nchains(#).

noisily Displays regression output for both conditional and unconditional models.

save Saves simulation output in two datasets (mcmcCond.dta, mcmcUnc.dta) for the conditional and unconditional models respectively.

cond() Bayesian arguments are passed only to the conditional model; default is bayesian arguments are included in both models.

uncond() Bayesian arguments are passed only to the unconditional model; default is bayesian arguments are included in both models.

Examples

Setup:

. use mstData.dta, clear

Simple model:

. srtbayes Posttest Prettest, int(Intervention)

Model using custom simulation options and all diagnostic options with base level change:

. srtbayes Posttest Prettest, int(ib1.Intervention) thr(0.1) mcmcsize(50000) burnin(50000) rseed(1234) nchains(4) sepch diag save

Model using custom simulation options with three-arm intervention variable, a vector of thresholds and custom priors:

. srtbayes Posttest Prettest, int(Intervention2) thr(0.3 0.4 0.5) mcmcsize(50000) burnin(50000) rseed(1234) nchains(4) normalprior(10) igammaprior(1 2)

Stored results

srtbayes stores the following in r():

Matrices

r(CondES) conditional Hedges’ g effect size and its 95% credible intervals for the trial arm(s) in interv_var.

r(UncondES) unconditional effect size for the trial arm(s) in interv_var, obtained based on variance from the unconditional model (model with only the intercept as a fixed effect).

r(Beta) estimates and credible intervals for variables specified in the model.

r(Sigma2) residual variance for conditional and unconditional models.

r(ProbES#) a matrix of Bayesian Posterior Probabilities such that the observed effect size is greater than or equal to a pre-specified threshold(s) for arm #.

r(sepchains_#) stores summary statistics for # number of chains separately.