search for: statesum

Displaying 1 result from an estimated 1 matches for "statesum".

Did you mean: statenum
2005 Jun 25
2
r equivalent of egen? Not tapply
...epeated many times (a list of states by observation). I want to create a vector with the same length with the same value repeated over and over again within states. The value I want is the number of observations that are in the same state as each observation. In stata, this is simply egen statesum = count(state), by(state). What is the r equivalent? tapply just gives me 50 observations. No luck yet trying apply, lapply, etc. Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94720 phone: (510) 643-1425 fax: (510) 643-7357 davidoff@haas.berkele...