Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Accessing saved results for mean


From   "Michael Lemay" <[email protected]>
To   <[email protected]>
Subject   st: Accessing saved results for mean
Date   Tue, 28 Aug 2007 15:40:01 -0400

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/



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