[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Thomas Jacobs" <thomasjacobs@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: basic matrix definition question |

Date |
Tue, 16 Oct 2007 09:16:09 -0500 |

Dear Kit, I found this out the hard way spending most of the day coding in Stata to get a single observation working and then choking when I discovered (OK, rediscovered) the 11,000 row limit in a Stata/SE matrix would prevent me from getting a matrix loop working as my ultimate target dataset exceeds 1 million rows. I then re-coded the whole thing in Mata in very little time. I found the language much more intuitive than stata programming (no gen vs. macro decisions or logic just set X = whatever and move on). As I said in another post, I will look forward to trying the maximize as you suggested. I have found the lack of examples in the Mata documentation pretty frustrating as I try to move my results back to Stata. More on this in an upcoming post. Thanks again. Sincerely, Tom On 10/16/07, Kit Baum <baum@bc.edu> wrote: > Doing something like this in Stata's matrix language is IMHO an > exercise in frustration (and punctuation). Per my recent posting on > solving nonlinear equations, you would be much better off setting up > the problem in Mata, making use of -optimize-. > > > Kit Baum, Boston College Economics and DIW Berlin > http://ideas.repec.org/e/pba1.html > An Introduction to Modern Econometrics Using Stata: > http://www.stata-press.com/books/imeus.html > > > On Oct 16, 2007, at 2:33 AM, statalist-digest wrote: > > > Thanks very much. I totally missed the mkmat command in the manual. > > Although I probably made the example too simple, I am trying to write > > a program to solve for two equations in two unknowns so I am building > > a partial derivative matrix for inverting. I calculate each of the 4 > > partials as variables and then combine them into a matrix. I was > > stuck on the create matrix step. Using local macros worked as well > > with a matrix command. I assume that I would need to first create two > > column vectors from 2 of the four variables and then combine these > > with another mkmat command. > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > -- Thomas Jacobs * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Re: basic matrix definition question***From:*Kit Baum <baum@bc.edu>

- Prev by Date:
**Re: st: Re: beginning programming advice** - Next by Date:
**Re: st: Re: moving from Stata to Mata** - Previous by thread:
**st: Re: basic matrix definition question** - Next by thread:
**st: Re: moving from Stata to Mata** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |