I have an algorithm to generate counterfactuals in dynamic programming problem that is currently written in Stata but needs to be written in MATLAB or AMPL for more efficient optimization.
... What I need the freelancer to do:
- Understand the algorithm, written in English, and the code, written in Stata
- Efficiently and clearly write a code in MATLAB or AMPL that does the same thing (minus any optimization, which currently isn't part of the Stata code)
- As a bonus, it would be nice to incorporate optimization in the MATLAB or AMPL code, using MPEC or some other gradient-based method like fminunc
Key skills needed for the job:
- Understanding mathematical concepts, such as expectations
- Efficient coding, both in terms of computation, memory, and time; for example, the problem may involve sparse matrices
- As a bonus, understanding methods of optimization, and specifying numerical or analytical gradients and Hessian matrices
A successful engagement will look like the following:
- The Stata code will be replicated (i.e., results that the Stata code produces will also be produced by the MATLAB or AMPL code)
- Potentially inefficiencies or even mistakes in the Stata code could be identified
- The foundation for something that could be used in an optimization routine will be constructed, potentially the optimization itself could be done under this contract
See attachments for more information on the conceptual framework (cf_algorithm.pdf), the empirical setting (empirical_setting.pdf, which also includes a discussion of what is saved as data), and the Stata code (compute_cf_policies.ado).
... ., results that the Stata code produces will also be produced by the MATLAB or AMPL code)
- Potentially inefficiencies or even mistakes in the Stata code could be identified
- The foundation for something that could be used in an optimization routine will be constructed, potentially the optimization itself could be done under this contract
See attachments for more information on the conceptual framework (cf_algorithm.pdf), the empirical setting (empirical_setting.pdf, which also includes a discussion of what is saved as data), and the Stata code (compute_cf_policies.ado).