Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: code for dynamic programming

From   Partho Sarkar <[email protected]>
To   [email protected]
Subject   Re: st: code for dynamic programming
Date   Fri, 2 Mar 2012 20:48:43 +0530


Glad it helped somewhat, but I don't think there is any cause for
despair- if you are prepared to put in a minimum amount of effort!
There has been a lot of programming developed for these problems.  You
just have to grind through the basic steps of searching, locating a
language/program that suits you & which you can access easily,
mastering the essentials, and building up the algorithm is steps of
increasing complexity. R is open-source, and there is an enormously
rich repository of user contributed programs in diverse areas
including, I am sure, DP- see  the CRAN project.

[ Just to give some perspective, in a way, things are *much* easier
for beginning programmers now- when some of us started out, we didn't
have acces to any internet forums, not to mention archives of
lectures, papers & programs!]

Good luck.


On Fri, Mar 2, 2012 at 8:35 PM, Osei Kuffour Wiafe <[email protected]> wrote:
> Partho,
> Thanks for the ideas and the attached resources are very enlightening.
> Yes, it's an Inter-temporal utility maximizing
> problem, and now it looks to be far-fetched for me!
>  Nick,
> I appreciate your thoughts too. I hope someone comes up with something
> in this field in the very near future!
> thanks guys!
> On Fri, Mar 2, 2012 at 7:10 PM, Partho Sarkar <[email protected]> wrote:
>> Osei, from your post it is not clear to me exactly  what you are
>> trying to do- I think you would get more help if you explain that
>> clearly.  Some remarks & suggestions below , for what they are worth:
>> If it is an exercise in simulating/solving a dynamic programming (DP)
>> problem  as such (e.g., inter-temporal utility maximization of a
>> consumer, which is what your post suggests) , then Stata is simply not
>> the tool for it- Stata is by definition geared toward *statistical*
>> problems.  Sure, like any statistical package, it uses some
>> maximization algorithms, e.g., for maximum likelihood estimation, but
>> these are by their nature specific to that particular class of
>> problem.  (It might be possible to somehow manipulate   these to told
>> to solve a DP problem, but it doesn't seem very promising!)
>> For DP as such, which is a *mathematical/computational* problem, there
>> are many programs available in other languages/packages- Matlab would
>> be my first choice (or R or C++ ).  Have a look at
>> (the
>> Matlab section) -there are many other sources for DP algorithms in
>> Matlab.  ( It is some time since I have worked on this type of
>> exercise, so you might find more upto date information. )
>> On the other hand, if you are trying to *estimate* a dynamic discrete
>> choice model, then that is a *statistical* problem in which you can
>> utilize Stata's estimation tools (the key here would be  formulating
>> the estimation problem/equations properly, and not the algorithm).  I
>> have no experience of this, but if you search around, I am sure you
>> will be able to find some sources.  E.g., just at random,I found a
>> link to this recent paper :
>> I hope this helps.
>> Partho Sarkar
>> From      Osei Kuffour Wiafe <[email protected]>
>> To        [email protected]
>> Subject   st: code for dynamic programming
>> Date      Thu, 1 Mar 2012 21:12:16 +1000
>> Hey guys,
>> I'm quite new to stata and I need help with coding a backward recursive
>> problem. It is in the form of the Epstein-Zin utility and similar to the
>> Bellman equation. I'd appreciate any other dynamic programming code which
>> would relate to what I am doing. That should give me a clue to finding my
>> solution. For now I have no idea where to begin!
>> Hope to get some help from this forum.
>> Cheers,
>> O.K.
>> *
>> *   For searches and help try:
>> *
>> *
>> *
> --
> Cheers,
> *
> Osei K.
> Phone: + 61 7 3138 6857 *
> *Mobile: + 61 451 418 099
> *I don't know who my grandfather was; I am much more concerned to know what
> his grandson will be. ~ *Abraham Lincoln* *(1809- 1865)*
> Life is like riding a bicycle - in order to keep your balance, you must keep
> moving.  ~*Albert* *Einstein (1879-1955)
> *
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index