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

re: st: using vector notation to simplify coding

From   Kit Baum <>
Subject   re: st: using vector notation to simplify coding
Date   Wed, 12 Aug 2009 11:12:09 -0400

Dan said

Thanks for the clarification, Kit. I am having trouble shaking the SAS mindset on this stuff, and your note, along with Michael's, have helped a lot. I "get" the mata approach, being a old Fortran guy feels like a cumbersome solution in Stata right now, but I am sure that is a transitory feeling.

Actually it is a very elegant solution, taking advantage of the concept of 'view matrices' in Stata. Surely as another old Fortran guy you remember the EQUIVALENCE statement. That's what is happening with a view matrix (real programmers don't need no steenken pointers!) so that changes in Mata to the contents of the matrix (Y in my code) actually changes the contents of the Stata variables that populate the matrix. That is very powerful (and naturally can be dangerous if misunderstood).

(and ITSP, which illustrates this at greater length)


Kit Baum   |   Boston College Economics & DIW Berlin   |
An Introduction to Stata Programming |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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