Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: counting values across variables

From   Jason Thompson <>
Subject   st: counting values across variables
Date   Thu, 14 Apr 2005 11:53:51 -0500

Is there a Stata equivalent of the SPSS count function, which counts the number of occurrences of a particular value amongst a set of variables? Something like this:

count (newvar)=a1 to a21 (5), which assigns newvar the number of times a1-a21 equals 5 for each case?

Nothing in egen seems to be quite what I'm looking for.

* For searches and help try:

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