Statalist The Stata Listserver


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

st: RE: Counting Ulcers


From   "Earnhart, Benjamin J" <[email protected]>
To   <[email protected]>
Subject   st: RE: Counting Ulcers
Date   Thu, 7 Sep 2006 16:26:54 -0500

sort id
egen numuc=sum(vi), by(id)
tab numuc



*==========================================;
*Ben Earnhart
*Computer Consultant and 
*ICPSR Representative
*Department of Sociology and 
*College of Liberal Arts
*University of Iowa
*(319) 335-2887
*[email protected]
*==========================================; 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Raphael Fraser
> Sent: Thursday, September 07, 2006 4:14 PM
> To: [email protected]
> Subject: st: Counting Ulcers
> 
> Below is a snippet of my data. Each subject has 2 observation where vi
> indicates whether an ulcer is present or not. I would like to count
> the number of patients with ulcers on one leg only and those with
> ulcers on both legs.
> left=1, right=0
> 
> id     leg   vi
>       40   right    .
>       40    left    .
>       46   right    1
>       46    left    1
>       47    left    0
>       47   right    1
>       48   right    .
>       48    left    .
>       55    left    1
>       55   right    1
>       57   right    0
>       57    left    1
> 
> Raphael
> *
> *   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/
> 

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