| Previous: Overview | Up: : A Program for | Next: Reference |
includes facilities to define and run multiple
models all at
once, and to combine them using formal Bayesian model averaging
procedures. The procedure, dbufdef =
eimodels_def(dbufdef,num,t,x,n,zb,zw);, enables you to define a
model specificiation (including all input variables
t,x,n,zb,zw, and all globals input to
), to assign it a
scalar integer model number, num, and to store it in a ``meta
data buffer,'' dbufdef. The meta data buffer contains a set
of individual data buffers, each containing everything needed to
define one specification. You can run eimodels_def multiple
times to store as many models in dbufdef as needed (the first
time you run the procedure, set dbufdef="";).
Once all model specifications have each been defined and stored, use dbufrun = eimodels_run(dbufdef); to run ei on each of the stored specifications and save the results in another meta data buffer, dbufrun. The results of each ei run can be read using v = eiread(dbufrun); and eigraph(dbufrun); while specifying the model number with the global variable, _EIMetaR (default of this variable is 1 which reads the results of ei run for Model 1).
Finally, run dbufavg = eimodels_avg(dbufrun); to use Bayesian Model Averaging to combine the results from multiple models with weights (the procedure calculates) indicating how much the data supports each model. The results of this model averaging can be read using v = eiread(dbufavg); and eigraph(dbufavg); where dbufavg is the output data buffer. To use this method, the prior distribution for covariates should be specified for each model using the global variables, _EalphaB and _EalphaW, so that the resulting posterior distribution is known to be proper.