an issue with Rating Scales

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

an issue with Rating Scales

Mohammed Mustafa

Dear all,

 

In an educational survey, I’m having a question with 48 statements, to be rated for 8 different universities on a 6 points importance scale

The data of this question is listed in 384 variables (48 x 8)

How can I calculate the summaries in percentage for each statement and each college for the positive responses (scale from 1-3) and negative responses (scale 4-6) were the output would be a table of 48 rows (statements) and 16 rows (negative and positive for each of the 8 universities)

I’m using PASW 18

 

Thanks in advance for your help

 

Mohd M. Aayed

 

Reply | Threaded
Open this post in threaded view
|

AW: an issue with Rating Scales

Mario Giesel

Mohd, this is a "quick & dirty" solution. Hope it helps.

 

* ============================================= START MACRO.

DEFINE !summary (!POS !CMDEND)

!DO !i !IN (!1)

!LET !dich = !CONCAT("d_",!i)   /* create new dichotomized variable with prefix 'd_' */

RECODE !i (1 THRU 3 = 1) (4 THRU 6 = 2) (ELSE = SYSMIS) INTO !dich.

APPLY DICTIONARY FROM * / SOURCE VAR = !i/ TARGET VAR = !dich.

FORMAT !dich (F1.0).

VAL LAB !dich 1 "Top 3 (1,2,3)" 2 "Low 3 (4,5,6)".

FRE !dich.

!DOEND

!ENDDEFINE.

* ============================================= END MACRO.

 

* Fill in your variables here.

!summary var_1 var_2 etc .




Von: Mohd Aayed <[hidden email]>
An: [hidden email]
Gesendet: Mittwoch, den 31. März 2010, 18:15:58 Uhr
Betreff: an issue with Rating Scales

Dear all,

 

In an educational survey, I’m having a question with 48 statements, to be rated for 8 different universities on a 6 points importance scale

The data of this question is listed in 384 variables (48 x 8)

How can I calculate the summaries in percentage for each statement and each college for the positive responses (scale from 1-3) and negative responses (scale 4-6) were the output would be a table of 48 rows (statements) and 16 rows (negative and positive for each of the 8 universities)

I’m using PASW 18

 

Thanks in advance for your help

 

Mohd M. Aayed

 


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
Mario Giesel
Munich, Germany
Reply | Threaded
Open this post in threaded view
|

Re: an issue with Rating Scales

Richard Ristow
In reply to this post by Mohammed Mustafa
At 12:15 PM 3/31/2010, Mohd Aayed wrote:

I have a question with 48 statements, to be rated for 8 different universities on a 6 points importance scale. The data of this question is listed in 384 variables (48 x 8) [in one record]. How can I calculate percentage for each statement and each college for the positive responses (scale from 1-3) and negative responses (scale 4-6) where the output would be a table of 48 rows (statements) and 16 rows (negative and positive for each of the 8 universities)

You should probably handle this by 'unrolling' the data, probably to one record per statement per university. But I'm not sure exactly what you want. First, in your "table of 48 rows (statements) and 16 rows (negative and positive for each of the 8 universities)", I assume you mean "16 variables"? And second, this is only meaningful if you have multiple records -- repetitions? -- each with all 48 variables.

Anyway, if you do have multiple records, each response is identified by a triplet of indices: Repetition; University; and Statement. In your data, the first of these (Repetition) is between records; the other two (University and Statement) are within records. SPSS works best with indices between records. The process of changing single records with indices within records, to multiple records with indices between records, is called 'unrolling'. Here's how you'd do it, using AGGREGATE to summarize after unrolling. The test data, below, has 5 statements and 3 universities.

[TestData]
Rep
eat U1S1 U1S2 U1S3 U1S4 U1S5 U2S1 U2S2 U2S3 U2S4 U2S5 U3S1 U3S2 U3S3 U3S4 U3S5

001   2    3    2    1    4    4    5    3    5    4    6    6    6    6    6
002   1    2    1    1    2    4    4    4    4    3    6    6    6    6    6
003   1    4    2    1    1    4    4    5    3    3    6    6    6    6    6
004   4    3    3    3    3    5    2    2    5    4    6    6    6    6    6
005   1    1    2    3    1    5    4    2    3    5    6    6    6    6    6
006   2    2    3    3    1    5    4    3    5    2    6    6    6    6    6
007   2    1    4    2    3    4    2    5    6    5    6    6    6    6    6
008   1    2    1    3    1    4    6    6    4    3    6    6    6    6    6
009   2    4    2    3    2    3    2    5    2    5    6    6    6    6    6
010   3    1    2    3    1    4    5    5    5    4    6    6    6    6    6
011   1    3    3    2    4    5    5    6    4    4    6    6    6    6    6
012   2    2    4    2    1    3    5    3    6    2    6    6    6    6    6
013   3    2    2    2    3    6    4    5    3    3    6    6    6    6    6
014   2    2    2    2    1    4    3    5    4    4    6    6    6    6    6
015   2    1    2    4    2    5    5    5    3    6    6    6    6    6    6
016   1    3    2    4    3    5    4    5    3    3    6    6    6    6    6
017   1    2    4    2    2    3    5    5    2    5    6    6    6    6    6
018   2    3    2    3    2    3    3    6    4    4    6    6    6    6    6
019   2    2    3    2    3    6    4    5    3    4    6    6    6    6    6
020   1    2    1    2    2    5    5    5    4    3    6    6    6    6    6

Number of cases read:  20    Number of cases listed:  20

 
*  I.     Unroll the data:                                       ... .

*         Values are initially indexed by 'Repeat' (between      ... .
*         records), and University University and Statement      ... .
*         (within records). Unrolling converts to records        ... .
*         containing only one value each, with all three indices ... .
*         being between records. (So, all three are variables in ... .
*         the file.)                                             ... .

DATASET COPY     Unroll.
DATASET ACTIVATE Unroll WINDOW=FRONT.
VARSTOCASES
 /MAKE    Response FROM U1S1 TO U3S5
 /INDEX = University(3) Statement(5)
 /KEEP =  Repeat
 /NULL =  KEEP.

 
Variables to Cases
 
Notes
|-----------------------------|---------------------------|
|Output Created               |03-APR-2010 20:47:48       |
|-----------------------------|---------------------------|
[Unroll]
 
Generated Variables
|----------|------|
|Name      |Label |
|----------|------|
|University|<none>|
|Statement |<none>|
|Response  |<none>|
|----------|------|
 
Processing Statistics
|-------------|--|
|Variables In |16|
|-------------|--|
|Variables Out|4 |
|-------------|--|

 
LIST /CASES=17.

List
|-----------------------------|---------------------------|
|Output Created               |03-APR-2010 20:47:48       |
|-----------------------------|---------------------------|
[Unroll]
 
Repeat University Statement Response

  001        1          1       2
  001        1          2       3
  001        1          3       2
  001        1          4       1
  001        1          5       4
  001        2          1       4
  001        2          2       5
  001        2          3       3
  001        2          4       5
  001        2          5       4
  001        3          1       6
  001        3          2       6
  001        3          3       6
  001        3          4       6
  001        3          5       6
  002        1          1       1
  002        1          2       2
[etc.]
Number of cases read:  17    Number of cases listed:  17

 
*  II.    Summarize, by university and statement                 ... .

*         This summarizes across repetitions, giving a single    ... .
*         summary record for each univesity-statement pair       ... .

DATASET DECLARE  Summary.
AGGREGATE OUTFILE=Summary
   /BREAK = Statement University
   /PctPos 'Percent of positive responses' = PIN(Response,1,3)
   /PctNeg 'Percent of negative responses' = PIN(Response,4,6).

DATASET ACTIVATE Summary WINDOW=FRONT.
FORMATS PctPos  PctNeg (PCT5.1).

LIST.

List
|-----------------------------|---------------------------|
|Output Created               |03-APR-2010 20:47:49       |
|-----------------------------|---------------------------|
[Summary]
 
Statement University PctPos PctNeg

      1         1     95.0%   5.0%
      1         2     20.0%  80.0%
      1         3       .0%   100%
      2         1     90.0%  10.0%
      2         2     25.0%  75.0%
      2         3       .0%   100%
      3         1     85.0%  15.0%
      3         2     25.0%  75.0%
      3         3       .0%   100%
      4         1     90.0%  10.0%
      4         2     40.0%  60.0%
      4         3       .0%   100%
      5         1     90.0%  10.0%
      5         2     40.0%  60.0%
      5         3       .0%   100%

Number of cases read:  15    Number of cases listed:  15

 
*  III.   'Roll up' to create a single record for each           ... .
*         statement, with University again being a within-record ... .
*         index.                                                 ... .

CASESTOVARS
 /ID = Statement
 /INDEX = University
 /GROUPBY = INDEX .

Cases to Variables
|-----------------------------|---------------------------|
|Output Created               |03-APR-2010 20:47:49       |
|-----------------------------|---------------------------|
[Summary]
 
Generated Variables
|---------------|----------|------------------------|
|Original       |University|Result                  |
|Variable       |          |--------|---------------|
|               |          |Name    |Label          |
|---------------|----------|--------|---------------|
|PctPos  Percent|1         |PctPos.1|PctPos.1:      |
|of positive    |          |        |Percent of     |
|responses      |          |        |positive       |
|               |          |        |responses      |
|               |----------|--------|---------------|
|               |2         |PctPos.2|PctPos.2:      |
|               |          |        |Percent of     |
|               |          |        |positive       |
|               |          |        |responses      |
|               |----------|--------|---------------|
|               |3         |PctPos.3|PctPos.3:      |
|               |          |        |Percent of     |
|               |          |        |positive       |
|               |          |        |responses      |
|---------------|----------|--------|---------------|
|PctNeg  Percent|1         |PctNeg.1|PctNeg.1:      |
|of negative    |          |        |Percent of     |
|responses      |          |        |negative       |
|               |          |        |responses      |
|               |----------|--------|---------------|
|               |2         |PctNeg.2|PctNeg.2:      |
|               |          |        |Percent of     |
|               |          |        |negative       |
|               |          |        |responses      |
|               |----------|--------|---------------|
|               |3         |PctNeg.3|PctNeg.3:      |
|               |          |        |Percent of     |
|               |          |        |negative       |
|               |          |        |responses      |
|---------------|----------|--------|---------------|
 
Processing Statistics
|---------------|---|
|Cases In       |15 |
|Cases Out      |5  |
|---------------|---|
|Cases In/Cases |3.0|
|Out            |   |
|---------------|---|
|Variables In   |4  |
|Variables Out  |7  |
|---------------|---|
|Index Values   |3  |
|---------------|---|

 
LIST.

List
|-----------------------------|---------------------------|
|Output Created               |03-APR-2010 20:47:49       |
|-----------------------------|---------------------------|
[Summary]
 
Statement PctPos.1 PctNeg.1 PctPos.2 PctNeg.2 PctPos.3 PctNeg.3

      1     95.0%     5.0%    20.0%    80.0%      .0%     100%
      2     90.0%    10.0%    25.0%    75.0%      .0%     100%
      3     85.0%    15.0%    25.0%    75.0%      .0%     100%
      4     90.0%    10.0%    40.0%    60.0%      .0%     100%
      5     90.0%    10.0%    40.0%    60.0%      .0%     100%

Number of cases read:  5    Number of cases listed:  5

=============================
APPENDIX: Test data, and code
=============================
*  C:\Documents and Settings\Richard\My Documents                    .
*    \Technical\spssx-l\Z 2010ab\                                    .
*    2010-03-31 Aayed - an issue with Rating Scales.SPS              .

*  In response to posting                                            .
*  Date:    Wed, 31 Mar 2010 19:15:58 +0300                          .
*  From:    Mohd Aayed <[hidden email]>                         .
*  Subject: an issue with Rating Scales                              .
*  To:      [hidden email]                                 .

*  "I have a question with 48 statements, to be rated for 8          .
*  different universities on a 6 points importance scale The data    .
*  of this question is listed in 384 variables (48 x 8) How can I    .
*  calculate the summaries in percentage for each statement and      .
*  each college for the positive responses (scale from 1-3) and      .
*  negative responses (scale 4-6) were the output would be a table   .
*  of 48 rows (statements) and 16 rows (negative and positive for    .
*  each of the 8 universities)"                                      .

*  My take on it:                                                    .
*  In your "table of 48 rows (statements) and 16 rows (negative and  .
*  positive for each of the 8 universities)", I assume you mean "16  .
*  variables"? And second, this is only meaningful if you have       .
*  multiple records -- repetitions? -- each with all 48 variables.   .
*                                                                    .
*  Here's an example with 5 statements, 3 universities and 20        .
*  repetitions:                                                      .


*  ................................................................. .
*  .................   Test data               ..................... .
SET RNG = MT       /* 'Mersenne twister' random number generator  */ .
SET MTINDEX = 9000 /*  Providence, RI telephone book              */ .

INPUT PROGRAM.
.  NUMERIC Repeat (N3).
.  NUMERIC U1S1 TO U1S5
           U2S1 TO U2S5
           U3S1 TO U3S5  (F2).
.  VECTOR  Scale=U1S1 TO U3S5.          
.  LOOP Repeat = 1 TO 20.
.     LOOP #Ix = 1 TO 15.
.        RECODE #Ix (1 THRU 5 = 1) (6 THRU 10 = 3) (7 THRU 15 = 5)
           INTO #Mean.
.        COMPUTE Scale(#Ix) = 1 + RV.BINOMIAL(5,#Mean/5).
.     END LOOP.
.     END CASE.
.  END LOOP.
END FILE.
END INPUT PROGRAM.
DATASET NAME TestData.

*  .................   Test data               ..................... .
LIST.

*  I.     Unroll the data:                                       ... .

*         Values are initially indexed by 'Repeat' (between      ... .
*         records), and University University and Statement      ... .
*         (within records). Unrolling converts to records        ... .
*         containing only one value each, with all three indices ... .
*         being between records. (So, all three are variables in ... .
*         the file.)                                             ... .

DATASET COPY     Unroll.
DATASET ACTIVATE Unroll WINDOW=FRONT.

VARSTOCASES 
 /MAKE    Response FROM U1S1 TO U3S5
 /INDEX = University(3) Statement(5)
 /KEEP =  Repeat
 /NULL =  KEEP.

LIST /CASES=17.

*  II.    Summarize, by university and statement                 ... .

*         This summarizes across repetitions, giving a single    ... .
*         summary record for each univesity-statement pair       ... .

DATASET DECLARE  Summary.

AGGREGATE OUTFILE=Summary
   /BREAK = Statement University
   /PctPos 'Percent of positive responses' = PIN(Response,1,3)
   /PctNeg 'Percent of negative responses' = PIN(Response,4,6).
  
DATASET ACTIVATE Summary WINDOW=FRONT.

FORMATS PctPos  PctNeg (PCT5.1).

LIST.

*  III.   'Roll up' to create a single record for each           ... .
*         statement, with University again being a within-record ... .
*         index.                                                 ... .

CASESTOVARS
 /ID = Statement
 /INDEX = University
 /GROUPBY = INDEX .

LIST.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: an issue with Rating Scales

Richard Ristow
At 02:37 PM 4/5/2010, Mohd Aayed wrote, off-line:

I’ve attached the question in a separate .SAV file.
Hope it’s more clear this way

It looks like your data is structured just as I had guessed:

. Within records, 48 statements by 8 universities responding
. Multiple records in the same format -- 917, in the file you sent me.

There's no identifying variable for the 917 records: date of response, or what? That's a bad idea, but that's for you to deal with.

Since the records will be broken up, you should at least assign a sequence number identifying them:

COMPUTE RecdNum = $CASENUM.

Increase the numbers of universities and questions to match your data, and change the variable names in the VARSTOCASES statement to match your data. And it should run, though you probably want to re-label your variables. Then you get something like the following, where changes are in boldface. (It's untested; I don't have time, at the moment.)

*  COMPUTE RecdNum = $CASENUM.

*  I.     Unroll the data:                                       ... .

*         Values are initially indexed by 'RecdNum' (between     ... .
*         records), and University and Statement                 ... .
*         (within records). Unrolling converts to records        ... .
*         containing only one value each, with all three indices ... .
*         being between records. (So, all three are variables in ... .
*         the file.)                                             ... .

DATASET COPY     Unroll.
DATASET ACTIVATE Unroll WINDOW=FRONT.

VARSTOCASES 
 /MAKE    Response FROM  x570 TO x953
 /INDEX = University(8) Statement(48)
 /KEEP =  RecdNum
 /NULL =  KEEP.

.  /**/  LIST /CASES=17  /* Not advised /**/.

*  II.    Summarize, by university and statement                 ... .

*         This summarizes across repetitions, giving a single    ... .
*         summary record for each univesity-statement pair       ... .

DATASET DECLARE  Summary.

AGGREGATE OUTFILE=Summary
   /BREAK = Statement University
   /PctPos 'Percent of positive responses' = PIN(Response,1,3)
   /PctNeg 'Percent of negative responses' = PIN(Response,4,6).
  
DATASET ACTIVATE Summary WINDOW=FRONT.

FORMATS PctPos  PctNeg (PCT5.1).

.  /**/  LIST            /* Not advised /**/.

*  III.   'Roll up' to create a single record for each           ... .
*         statement, with University again being a within-record ... .
*         index.                                                 ... .

CASESTOVARS
 /ID = Statement
 /INDEX = University
 /GROUPBY = INDEX .

LIST.

Try it, and see.

-Best of luck to you,
 Richard
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD