Gary King Homepage Previous: Format: Up: EIMODELS Next: Example:

Purpose:

eimodels_def stores multiple model definitions in a meta data buffer by adding one model at a time. Each model can use different covariates and/or different values of various global variables used for ei estimation. eimodels_def only stores model specifications; it does not run any models. Results are stored in ndbuf2, a meta data buffer which should be read with eiread with the model number specified as the value of the global variable, _EIMetaR.

eimodels_run takes the output meta data buffer from eimodels_def as an input and runs all the models stored in that meta data buffer. The output is another meta data buffer which contains the results of ei runs for each model as a single component data buffer. This output data buffer should be read with eiread and eigraph with the model number specified using the global variable, _EIMetaR (the default for which is 1, for the first model).

eimodels_def and eimodels_run are useful when you have different numbers of $ {\mathfrak{E}I}$models to run but want to store the results in one meta data buffer rather than saving them as many separate data buffers. The two procedures can also be used for the method called Bayesian Model Averaging as explained below.

eimodels_avg takes the output meta data buffer from eimodels_run as an input and implements Bayesian Model Averaging over all the models stored in that data buffer. To use this procedure, three global variables are required for each of the component EI runs. First, when a model includes covariates, the prior distributions for $ \alpha^a$ and $ \alpha^b$ need to be specified for Bayesian Model Averaging in order to ensure that the posterior distribution is proper. The two global variables, _Ealpha_B and _Ealpha_W, perform this function. Second, $ {\mathfrak{E}I}$uses the Laplace approximation (default) or the harmonic mean estimator, for computing the marginal likelihoods. It is recommended that the number of simulations, _Esims, should be set to a relatively large number in order to improve the precision of this estimation. If you use the harmonic mean estimator, _EiLikS should be set to 1 for each model so that the output data buffer from eimodels_run stores the values of the log-likelihood at each simulation. These values are necessary to compute the marginal likelihood for this method. Finally, the output data buffer should be read with eiread and eigraph.



Gary King 2006-09-13