Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Frequency Table for Likert Scale Items

704 views
Skip to first unread message

SFC

unread,
Oct 20, 2008, 2:48:53 AM10/20/08
to
I would like to seek advice on a simple task that I failed to do in
SPSS, :)

Suppose I have a list of items with the same response format (e.g., 1:
Strongly Agree to 5; Strongly Disagree). What I need a frequency table
with items (variables) as the rows, and responses (1 to 5) as the
columns, and the cells being the frequency counts.

I can construct the table in Excel from tables from other procedures
(e.g., frequency tables, crosstab tables, etc.). However, I wonder
whether I can generate this as one single table in SPSS.

I tried OMS, and these are the commands:

DATASET DECLARE Test.
OMS
/SELECT TABLES
/IF COMMANDS=['Frequencies'] SUBTYPES=['Frequencies']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='Test'
/COLUMNS SEQUENCE =[R1].
Freq Q1 Q2 Q3.
OMSEND.

All items have the same values labels. If I have only one column for
each response for all items, then I can simply select rows with Var1 =
"Frequency" and get what I need. However, in the generated data file,
one set of response is generated for each item. In other words, I have
five columns for Q1's five responses, five columns for Q2's five
responses, and five columns for Q3's five responses.

How should I modify the commands? Or is there any existing SPSS
command that can generate what I need?

Thanks. ^_^

--
Shu Fai

Kenny M

unread,
Oct 20, 2008, 5:03:53 AM10/20/08
to

If you do this in the custom tables dialogue, under 'category
position', just click 'row labels in column'.

SFC

unread,
Oct 20, 2008, 8:00:48 AM10/20/08
to
Thanks. :)

Unfortunately, it seems that the university I work at does not have
the license for the Tables add-on.

Therefore, I need to rely on Base module and OMS.

I now remember that I might have done the task using the Report
command. I'll check tonight.

-- Shu Fai

RichUlrich

unread,
Oct 20, 2008, 1:52:30 PM10/20/08
to
On Mon, 20 Oct 2008 05:00:48 -0700 (PDT), SFC
<shufai...@gmail.com> wrote:

>Thanks. :)
>
>Unfortunately, it seems that the university I work at does not have
>the license for the Tables add-on.
>
>Therefore, I need to rely on Base module and OMS.
>
>I now remember that I might have done the task using the Report
>command. I'll check tonight.
>
>-- Shu Fai
>

>On 10?20?, ??5?03?, Kenny M <no...@nowhere.com> wrote:
>>
>> If you do this in the custom tables dialogue, under 'category
>> position', just click 'row labels in column'.

I posted a macro routine for doing similar tabulations about
10 years ago. This used Flip and Count in the macro.

I Googled < coltab ulrich > (without even going to Groups),
and the first hit was a post that included the routine. Try

http://listserv.uga.edu/cgi-bin/wa?A2=ind9810&L=spssx-l&D=0&P=6745

- if you want to see if it is something you could use or adapt.

--
Rich Ulrich

SFC

unread,
Oct 21, 2008, 5:46:09 AM10/21/08
to
Thanks for the macro. I will take a look.

--
Shu Fai

SFC

unread,
Oct 21, 2008, 6:03:34 AM10/21/08
to
I would like to reply myself, as another post on CASETOVARS inspired
me the solution. :)

Basically, the frequency tables are output to a SAV file "as is", and
then use CASETOVARS
to restructure this SAV file.

---

DATASET DECLARE Test.
* In this OMS, instead of listing frequencies in columns, the format
like the original frequency tables is used.


OMS
/SELECT TABLES
/IF COMMANDS=['Frequencies'] SUBTYPES=['Frequencies']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='Test'

/COLUMNS SEQUENCE =[C1].
Freq Q01 Q02.
OMSEND.
* The following command removes the first three variables, having the
same value for all rows.
Delete variables TableNumber_ Command_ Subtype_.
* This command is necessary to convert blank in Var2 for the last row
of total frequency to something else.
If (Var2 = '') Var2 = 'Grand'.
SORT CASES BY Label_ .
CASESTOVARS
/ID=Label_
/INDEX=Var1 Var2
/GROUPBY=VARIABLE.

---

The resulting data file will have one row for each table (item). I can
then select those columns I need easily.

The above commands assume that the values or value labels in the
frequency tables can be converted to
SPSS variable names. This should not be a problem if SPSS is set to
display numeric values instead of
value labels in pivot tables.

Best Regards,
Shu Fai

0 new messages