Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: RE: [Mata] naming matrices in a loop

From   Kit Baum <>
Subject   Re: st: RE: [Mata] naming matrices in a loop
Date   Sat, 20 Mar 2010 07:10:40 -0400


On Mar 20, 2010, at 2:33 AM, Antoine wrote:

> I've tried pointers, but I must be doing something wrong. Must have a 
> closer look at the manual.
> Since the matrices need not have the same dimensions, I cannot just 
> populate a larger matrix with the results.

There is a worked example, with explanation, of the use of pointers to create a number of matrices (which indeed need not be of the same dimensions) in section 14.8, "Computing the seemingly unrelated regression estimator for an unbalanced panel", in An Introduction to Stata Programming. In this case one of the sets of matrices are the X'X matrices for each equation, and in SUR one can have different numbers of Xs in each equation, so the matrices are of different order.

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–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index