[ Search |  Up Level |  Project home |  Index |  Class hierarchy ]

 RustEmet1987mle.ox

Replicate MLE Estimates Reported in Rust (1987).

This package extends the basic model RustEmet1987 to read in data and estimate parameters using maximum likelihood.

The results produced by this code are presented in Ferrall (2022)

RustEstimates is a class that stores the objects used for the estimation, including the solution method, outcome data set, and MLE optimization algorithm. The state space \(\Theta\) is built up from the EZ class that in turn is derived from the Zurcher class for the value function iteration without data.

There is a menu for selecting which estimates to replicate, which can be used interactively running examples/main.ox or using command line arguments. The latter requires knowing the index of options to code. See the script in /examples/my_estimate_rust_script.

Run(targ) carries out the staged-estimation for a single specification. It is the function that is called by the menu after setting options. Or a user can call it directly by sending the list of options directly. The model is set up, data read in, estimated parameters added to the econometric objective, and 3 stages of estimation are carried out.

The data are stored as a BusData object, which reads in the data and matches columns of the data file to variables in the model. Which file is read in is determined by the options sent to Run().

 BusData

Some of the bus data used . See RustEmet1987readdata2022.
Public fields
 filename const
Public methods
 BusData Create the data object.

 EZ : Zurcher

The Zurcher model with estimated Parameters.
Public fields
 hat static list of parameter estimates.
Public methods
 SetUp static Setup the DP model and first stage estimation.
 Utility Return U() at estimated (hat) parameter values.
Inherited methods from Zurcher:
Output, Run, SetSpec
Inherited fields from Zurcher:
bins, COL, dfactor, DMETH, mfact, normalization, NX, parlist, pars, rc, ROW, th1, x
Inherited enumerations from Zurcher:
RNpars, Zparams

 RustEstimates

Contains objects related to estimation in a catchall class.

Model, solution, data, and estimation algorithm each deal with its part of the problem.
Public fields
 buses static bus data as a DataSet.
 EMax static Value function iteration method.
 mle static Optimization algorithm applied to nfxp.
 nfxp static Panel Black Box objective using buses data.
 plist static Parameter lists by stage.
 targ static OxMenu menu for setting parameters interactively.
Public methods
 menu static Creates the interactive menu items for choosing method, table, column, and row to replicate.
 Run static Replicate bus estimation.
 SetTarget static Get runtime options from the command line or through the interactive menu.

 BusData

 BusData

BusData :: BusData ( method )
Create the data object.

Data files created by RustEmet1987readdata2022.ox

This creates a OutcomeDataSet, which is a Panel of individual outcome with econometric objectives and data-matching methods available.


 filename

const decl filename [public]

 EZ

 hat

static decl hat [public]
list of parameter estimates. Current values are copied into variables used by Zurcher

 SetUp

static EZ :: SetUp ( )
Setup the DP model and first stage estimation. row 0 or 1, row of Rust table to replicate
Returns:
3 lists of parameters.
Calibrated (empty, unless δ is added to the parameter vector) Transition-related Utility-related

 Utility

EZ :: Utility ( )
Return U() at estimated (hat) parameter values. This uses the same basic utility by setting the parameter values to the current values of estimated parameters.7

 RustEstimates

 buses

static decl buses [public]
bus data as a DataSet.

 EMax

static decl EMax [public]
Value function iteration method.

 menu

static RustEstimates :: menu ( )
Creates the interactive menu items for choosing method, table, column, and row to replicate.

 mle

static decl mle [public]
Optimization algorithm applied to nfxp.

 nfxp

static decl nfxp [public]
Panel Black Box objective using buses data.

 plist

static decl plist [public]
Parameter lists by stage.

 Run

static RustEstimates :: Run ( target )
Replicate bus estimation. @input target list of options for which specification to estimate.
Default is {0,0,1,0}, which means Month-Method, Table IX, 2nd Column, 1st Row.
See also:
RNpars

 SetTarget

static RustEstimates :: SetTarget ( CmdLine )
Get runtime options from the command line or through the interactive menu. Send the parameters to Run() to run the estimation procedure

 targ

static decl targ [public]
OxMenu menu for setting parameters interactively.