Date: Fri, 11 Oct 2002 13:49:30 -0700
Reply-To: "Gao, Peter" <PGao@hca.co.orange.ca.us>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Gao, Peter" <PGao@hca.co.orange.ca.us>
Subject: Looking for help with syntax-data manipulation
Content-Type: text/plain; charset="iso-8859-1"
Dear list members,
I hope someone can help me with this:
I have a matrix of variables, the record line (case) is about disease
names, the variables (columns) are names of foods or medicines. Not all
entries have a value (have missing values here and there). I am trying to
produce an output that will show one food associated with how many diseases
or one disease associated with how many foods.
Example of my data (actual data file is large with 53 columns):
diseases meats dairy eggs medicine drug perfume oil
bone cancer 1 1 . 1 . 1
.
Brain cancer 1 . 1 . 1 .
1
Lung cancer . 1 . . . .
1
output or data will be something like:
bone cancer: meats, dairy medicine perfume
Brain cancer: meats, eggs, drug, oil
Lung cancer: dairy, oil
The resulting list has varied number of variables.
I wish someone with the expertise can write the syntax to do it. Many thanks
in advance.
Have a nice weekend.
Peter Gao
|