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

From |
SamL <saml@demog.berkeley.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
A simpler count question Re: st: RE: Re: Counts of different valuesin one variable by another variable |

Date |
Fri, 26 Mar 2004 07:15:51 -0800 (PST) |

I want to know how many values of variable X there are in my data. I don't need to know the frequency distribution of X, I need to know how many values of X there are. For example, if the true frequency distribution is: Value Frequency Pct 1 8 8.0 2 20 20.0 3 30 30.0 4 20 20.0 7 12 12.0 15 10 10.0 then, I only want a count of the Value column (which is 6 in the case above). My problem is that I -tab1- a variable but there are too many values for it to run the frequency distribution. I could use by, but that could get very tedious with counting, and could be prone to error when I add up across the by variable. I expect there to be something on the order of 3700 values, but I have to check to be sure. My check of the manual and the stata web-site turned up nothing, but perhaps I do not know for what command or keyword I should search. Ideas appreciated. Thanks. Sam * * 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/

**Follow-Ups**:**Re: A simpler count question Re: st: RE: Re: Counts of different values in one variable by another variable***From:*Nick Winter <nw53@cornell.edu>

**Re: A simpler count question Re: st: RE: Re: Counts of differentvalues in one variable by another variable***From:*Edwin Leuven <e.leuven@uva.nl>

**References**:**st: RE: Re: Counts of different values in one variable by another variable***From:*"Donnell Butler" <djbutler@princeton.edu>

- Prev by Date:
**RE: st: Question of factor analysis** - Next by Date:
**Re: st: Re: Running Stat/Transfer from Stata Command ?** - Previous by thread:
**st: RE: Re: Counts of different values in one variable by another variable** - Next by thread:
**Re: A simpler count question Re: st: RE: Re: Counts of differentvalues in one variable by another variable** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |