Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Re: a specific data management question


From   "John F Hall" <[email protected]>
To   <[email protected]>
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: [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index