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]

st: Extracting specific elements from a matrix

From   Dani Tilley <>
Subject   st: Extracting specific elements from a matrix
Date   Mon, 5 Jul 2010 13:36:25 -0700 (PDT)


I need to extract the first element of a matrix of coefficients and store it on a variable, and repeat the process i times. I can set up the for loop and do the storing, but I don't know how to access element [i,j] of a matrix A.

In particular, my matrix is e(b), the vector of coefficients from a regression with k explanatory variables. I tried -e(b)[1,1]- but that didn't take me far.

Any help is appreciated.

DF Tilley

*   For searches and help try:

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