Hi all,
I am trying to create a dataset of means. I'm using the following
syntax:
postfile asa_esttab v1 v2 using asa_esttab, every(1) replace
foreach x in pint pncmp pact {
mean `x' if (country==6)
local `x'n "`e(b)'"
mean `x' if (country==11) [pweight=pscore]
local `x's "`e(b)'"
post asa_esttab (``x'n') (``x's')
}
postclose asa_esttab
I get the following error message:
matrix not found
post: above message corresponds to expression 1, variable v1
r(111);
I know the loop works because when I request the sample size be stored
[e(N)] instead of the mean [e(b)], it runs without a problem. Any help
is greatly appreciated.
Michael
*
* 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/