Date: Sun, 27 Nov 2011 16:12:22 -0500
Reply-To: bbser 2009 <bbser2009@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: bbser 2009 <bbser2009@GMAIL.COM>
Subject: Re: producing frequency percentages for multiple questions
Content-Type: text/plain; charset="us-ascii"
This is just about the clumsiness you mentioned below. But I am not sure if
this will be helpful.
1. Given 30 tables as SAS data sets, you might want to use macro loop and
proc append to concatenate them automatically.
2. For raw data files, just use infile statement option filevar= to
automatically concatenate them.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Painter, John (jsp9a)
Sent: November-26-11 3:06 PM
Subject: [SAS-L] producing frequency percentages for multiple questions
I need to summarize % endorsing each response option for customer
satisfaction survey data consisting of 14 questions (4-pt likert type scale)
and 30 products. The data are summarized overall for each of the 14
questions, then by product so I have 31 tables in the end.
It has been a while since I've attempted this in SAS. For the overall table
I can obtain the frequency stats using proc freq, save each data file, and
concatenate them to form the desired table. But this seems very clumsy. Is
there a more efficient procedure?
For the second type of report table I started with proc tabulate and this
Proc tabulate ;
Class product q1 ;
Table product q1 ;
ODS OOUTPUT table=q1 ;
Which delivers the error "The variable Q1 conflicts with the keyword of the
same name." The output looks like something I can use in a data step, but of
course no data file is produced. Any advice? I would prefer to have
percentages instead of counts. And I would like to include all 14 items in
one analysis, instead of running the same procedure 14 times.
Hopefully this makes sense.