Your variables chron?cat are in effect a data matrix.
There are various possible approaches to that. The
simplest without using any user-written software
is to -reshape- your data to long. See [R] reshape
and also http://www.stata.com/support/faqs/data/reshape3.html
First, make sure that your data set is -save-d
somewhere.
Second, you need to -rename- those variables
to a stub plus suffix form.
foreach v of var chron?cat {
rename chron`v'cat chroncat`v'
}
Now I assume you have a patient id somewhere.
If not, create one:
gen id = _n
Now
reshape long chroncat , i(id) j(time)
I am here guessing that 1 2 3 4 5 refer
to different times. If not, you can
supply a sensible name.
Now you should get the information
you want from
tab hroncat time
It seems to me that if you keep this 'wide' you would want 26 variables (as
Lee suggested could be created by egen) rather than 5. Unlike Nick, I took
the five to mean not measurements over time, but the answer to a multipart
question such as 'do any of these cc's really trouble you? If so which one
is the most troublesome?', 'which one is the next most troublesome'...'list
up to five that affect you' all at one point in time. If that is what you
have, then you do not care where the condition appears, perhaps (unless
they are truly ordered in terms of severity), and you would just want to do
'tab chroncat' after making the data long, following Nick's suggestions.