Statalist The Stata Listserver

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

Re: st: Counting Ulcers

From   "Dimitriy V. Masterov" <>
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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index