Hi,
I'm trying to collect the coefficients of variable X in a matrix while
doing the regression for different age groups. However, when I run the
program, I get a message saying that "matrix operation not found". Any
suggestions would be appreciated. Thanks.
matrix answers=J(100,1,0)
local i=23
while `i'<70 {
quietly regress y x if age==`i'
matrix answers(`i',1,0)=_b(x)
local i=`i'+1
}
*
* 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/