[ Search |  Project home |  Index |  Class hierarchy ]

 niqlow.ox

A package written in Ox for designing, solving and estimating empirical dynamic programming models.

Getting started …
Install & ExploreInstallation instructions to get niqlow going on your system(s).
Browse and run test code, examples, and replications
Tutorials
OODPRead the latest draft of the OODP academic paper that provides a niqlow-based definition of structural estimation and the existing literature.
niqlow has 3 components (separate but integrated)

DDP

FiveO

CFMPI

Derived Dynamic ProgramsObject Oriented Objective
Optimization in Ox
CF's Ox Inteface to the MPI Library
Stages of using niqlow

DESIGN

SOLVE

ESTIMATE

Step 1. Design Your DP model
Step 2. Solve the model
  • Use Methods to solve Bellman's equation for your model and compute choice probabilities.
  • Create Data outcomes for the solution, either simulated data or (averaged) predictions.
Step 3. Find parameter values
  • Use the integrated FiveO tools to maximize an objective or solve a system of equations that depends on the solved DP model.
  • See how to maximize a function in Get Started with FiveO
  • Select among standard algorithms
  • Use objectives that are integrated with DP models and external data or create your own.
Required DP Components
  • Choose among derived Bellman classes to base your template for each point \(\theta\) of the state space.
  • Choose key/required features of \(\theta\):
  • Code Utility()
  • Set the discount factor δ

Further customizations

When ready create the spaces
  • As your code executes the model is built until you tell DDP to CreateSpaces
  • DDP will built your state space \(\Theta\), the feasible action spaces \(A(\theta)\) and the space of problems (group space \(\Gamma\)).
  • Storage is economized by limiting storage at each point \(\theta\) and relying heavily on shared (static) variables
  • Now your code can solve and use the model …
Choose & apply a solution method.
  • Solve for discrete choice probabilities (CCPs) under different assumptions or solve for reservation values of continuous random shocks.
  • Apply the solution to your model using its Solve() function.
  • Let the method handle storage and computation efficiently accounting for your clock and other details.
  • Create more than one method object to compare their performance

Create outcomes for the solved model
  • Create a Panel of outcomes so you can Simulate outcomes from the model or read in external data to compute likelihood .
  • Create a PanelPrediction to Predict expected outcomes (averaged over all random elements) and read in external moments to compare them to.
  • Send a solution method to the data object: when any prediction or econometric calculation is needed the model will be resolved (a nested algorithm).

Map model outcomes to data
  • Map components (actions, state variables) to external data
  • Treat unmapped components as missing.
  • Add auxiliary outcomes to the data to augment incomplete information.
  • Automatically integrate over "random effects" when computing econometrics objectives and the add values across fixed effects (observed groups)
Parameterize your DP model
  • Make parameters of Utility and state transitions objects of a Parameter or ParameterBlock class.
  • Use built-in types of parameters to constrain them to open intervals in one or more related dimensions.
  • Control which parameters are free to vary or should be held fixed by solution algorithms.

Create a criterion (objective)
  • Use an automatically generated econometric objective already available that depend on external data.
  • Create a system of equations to find Equilibrium prices.
  • Add DP parameters to the objective/system so they are associated with it.
  • Use built-in features to handle BHHH iteration
  • Choose among GMM weighting options

Optimize your objective.
  • Apply an Algorithm(s) using its Iterate() function.
  • Apply different methods, monitor and checkpoint progress
  • Rest assured: the DP model is re-solved each time the criterion is re-evaluated because you sent the solution method to the data objects.
  • Turn DP iteration on and off in order to carry out Two-Stage Estimation.

When your model …
Becomes Big
  • Use CFMPI package to work in parallel on a Linux cluster
  • Let niqlow handle parallel processing in optimization and model solving with no recoding
  • Or use high levels tools provided to create your own Client/Server and Peer-to-Peer tasks
  • Or use the low-level interfaces with the MPI library to customize.

Is Estimated
  • Use the estimated/equilibrium parameters to conduct policy experiments:
  • Change a parameter value at the top level of your code and be assured its propagates down to the DP solution and back up through predictions or simulated outcomes.
  • Create your own derived class to change the clock, expand the state space, allow more choice re-using the existing code and changing only what is necessary
Is a Contribution
  • Add new elements of your model to the niqlow source code on your computer then request your changes be implemented (pulled) into niqlow.
  • Create test or demonstration code for your new components or for core parts of niqlow.
  • Post your model code as a github repository to share it with others.
  • When your paper is published request your code be added to the replications.
The fine print …

License

Citation

Acknowledgements