Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: a specific data management question


From   "John F Hall" <johnfhall@orange.fr>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: a specific data management question
Date   Wed, 11 Aug 2010 09:15:28 +0200

Don't know about Stata as I don't have it here, but in SPSS:

count x = tag (1) .
crosstabs x by firm .        <various options for %, stats>

What's the syntax in Stata?

John Hall
http://surveyresearch.weebly.com

PS (just seen Michael Mitchell's reply, but I'll send this anyway)


----- Original Message ----- From: Grace Jessie
To: statalist@hsphsun2.harvard.edu
Sent: Wednesday, August 11, 2010 5:50 AM
Subject: st: a specific data management question



Dear statalists,
I have a sample like the following,


   firm   tag
      1     0
      1     0
      1     1
      1     1
      1     3
      2     0
      2     1
      2     2
      2     3
      3     0
      3     0


I want to generate a varialbe counting the number of "tag==1" in each level of firm.
How to do it?

Thank you a lot!

Grace
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index