Here is one way:
tabstat sales if month <3 , by(company) nototal save
tabstatmat means
-findit tabstatmat- to locate and download.
-summarize- will return several values as scalars. See -return list-
after -sum-
Hope this helps,
Scott
----- Original Message -----
From: Rajesh Tharyan <[email protected]>
Date: Wednesday, February 8, 2006 4:50 am
Subject: st: RE: RE: create a vector from observations
> Hi,
>
> Scott and kit
>
> Thanks very much for your help! Just a follow up on the question..
> can I
> store the mean calculated as a scalar and not a variable? And if I
> had many
> companies would I be able to create a vector of the means??
>
> Thanks very much
>
> Regards
> rajesh
>
*
* 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/