Statalist The Stata Listserver


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

st: RE: storing values from within "by varname :" command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: storing values from within "by varname :" command
Date   Sun, 22 Oct 2006 17:51:16 +0100

In addition to various other responses: -contract-
is the official Stata command designed to do this 
"ultimate" problem directly. 

Nick 
[email protected] 

Andrey V. Ivanov
 
> I have a dataset of individuals (and their characteristics) 
> that belong 
> to some groups and live in different regions.
> 
> I would like to be able to extract frequencies of individuals 
> by group 
> and region and store these frequencies in a different 
> dataset, ultimately.
> 
> so, I have the following code:
> 
> by region group : count (if...)
> 
> and now I want this to be stored in a special matrix that has 
> a vector 
> of group name, a vector of regions, and the vector of the 
> result of the 
> "count" command.
> 
> I know I can bypass all this if I collapse the dataset using 
> the "count" 
> option.
> 
> But, my question is more general: it is about storing the 
> output of some 
> command inside the "by varname :" construct.

*
*   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