|  |  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: tables to include columns for observations that are not present
| From | "b. water" <[email protected]> | 
| To | [email protected] | 
| Subject | RE: st: tables to include columns for observations that are not present | 
| Date | Mon, 27 Feb 2006 19:33:14 +0000 | 
How about a subsitute, something along the line of 999 or 99 for when a 
student has not encountered that condition.
Regards,
bw
----Original Message Follows----
From: "Christopher W. Ryan" <[email protected]>
Reply-To: [email protected]
To: Statalist <[email protected]>
Subject: st: tables to include columns for observations that are not present
Date: Mon, 27 Feb 2006 11:30:58 -0500
I am trying to use Stata to monitor and analyze the types of encounters that 
my medical students see in their family medicine course.  I use ICPC-2 
diagnostic codes to classify the encounters (International Classification of 
Primary Care).
I have a dataset with the following variables:
studentid
code
textforcode
count
It is easy enough to generate a table with students in rows down the side, 
and the ICPC codes in columns across the top, with the cells containing the 
number of times a student has seen that diagnosis:
-table studentid code, contents(sum count)-
My trouble arises with codes that *no* student has seen.  With the simple 
table-related commands with which I'm familiar, no column for such a code 
will appear in the table.  But there are 10 diagnostic codes that I need to 
monitor, to make sure every student has encountered at least one case of 
them.  So I'd like columns for those ten codes to always appear in the 
table, irrespective of whether anyone saw those diagnoses.  If no one has 
seen one of those diagnoses, then the cells in that column would all contain 
the number zero.
Any suggestions how to do this?
Thanks.
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
and Wilson Family Practice Residency, Johnson City, NY
cryanatbinghamtondotedu
GnuPG and PGP public keys available at http://pgp.mit.edu
"If you want to build a ship, don't drum up the men to gather wood, divide 
the work and give orders. Instead, teach them to yearn for the vast and 
endless sea."  [Antoine de St. Exupery]
*
*   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/
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
*
*   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/