| Date: | Fri, 9 May 2003 10:40:27 +0530 |
| Reply-To: | Regi Mathew <rmathew@QUINTANT.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Regi Mathew <rmathew@QUINTANT.COM> |
| Subject: | Re: Combining variables |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
You may try transposing the data set to bring ViolCode01 through ViolCode10 under one variable. Take the freq of the new variable to get frequency of all the codes of violation.
Note that this will change the structure of the data as driver_id would now appear multiple times.
proc transpose data=temp (keep=driver_id ViolCode01-ViolCode10) out=data2; by driver_id;
var ViolCode01-ViolCode10;
run;
Regi Mathew
Quintant Services
Bangalore, India
www.quintant.com
-----Original Message-----
From: Brent Baxter [mailto:bax@U.WASHINGTON.EDU]
Sent: Wednesday, May 07, 2003 1:25 AM
Subject: Combining variables
Is there an easy way to combine several character variables into one
variable for the purpose of viewing composite frequencies? I have cases
(drivers) with varying numbers of traffic violations (violations codes
stores in ViolCode01-ViolCode10). I'd like to produce a frequencies table
that show all the violation codes together, rather than the frequencies in
ViolCode01 through ViolCode10. Thanks for any help!
|