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

RE: RE: st: collapse syntax error


From   n j cox <[email protected]>
To   [email protected]
Subject   RE: RE: st: collapse syntax error
Date   Thu, 22 Sep 2005 12:15:50 +0100

In addition, this looks like a -contract- problem.

Nick
[email protected]

louis boakye-yiadom

Your code looks fine to me. How about updating to version 8.2 and trying
again?

Ramani

I am trying to calculate household size using collapse. The dataset has two variables, a unique household ID <uhhid> and the serial numbers of the >household members <hhmem>.
This is the code I used and the error I get.

. /*create variable household size*/
. use rindvar02, clear

. keep uhhid hhmem

. sort uhhid hhmem

. gen num=1

. collapse (sum) hhsize=num, by(uhhid)
invalid syntax
r(198);

I am using
Stata/SE 8.0 for Windows
Born 30 Jan 2003
Copyright (C) 1985-2003

*
* 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/




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