Thanks Dear Nick Cox.. that count and egen combination
is doing my job now.
Rijo John.
On Fri, 18 Jun 2004, Nick Cox wrote:
:-table-'s main job is to produce tables,
:not resultssets;
:as you don't like what -replace- does,
:your main option is to reproduce
:what -table- does by other means,
:e.g.
:
:egen count1 = count(var1), by(state)
:egen count3 = count(var3), by(state)
:gen newvar = count1 / count3
:
:Note that, necessarily, each value
:of these variables is repeated within
:groups of -state-. -egen, tag()- offers
:one handle here.
*
* 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/