Statalist The Stata Listserver

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

Re: st: Counting Ulcers

From   "Dimitriy V. Masterov" <[email protected]>
To   [email protected]
Subject   Re: st: Counting Ulcers
Date   Thu, 7 Sep 2006 17:33:28 -0400


bys id: egen type=sum(vi) if vi~=.
collapse type, by(id)

This will count people with missing observations as "." and not zero,
and it will avoid double-counting.

*   For searches and help try:

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