Search code examples
syntaxspss

Scoring program (SPS) error - not clear where the issue is?


I am trying to utilise an SPSS syntax programme to score a questionnaire. I have been given the scoring system by the developers (references below) but cannot get it to run. I am more familiar with STATA and could (at length) rebuild there, but my colleagues use SPSS so would be useless!

I would be grateful if anyone would be able to spot the error in the SPSS syntax (created in 2007).

Apologies if I have presented it incorrectly!

Tristan

ADDED after comments below!

the errors I'm getting are actually from Part E - no valid cases. Part D doesn't appear to be working for some reason - it does not generate zscores. Part F gives a warning of incorrect variable name.

Thanks again!

Tristan

Background:

Administration and Scoring The questionnaire is designed to be administered by self-report. If administered by postal survey rather than in person, standard techniques for ensuring a high response rate, including personalized letters, standardized instructions and follow-up reminder letters, should be used in conducting the postal survey. The questionnaire provides two summary scores as described above. For both scores, high values indicate better outcomes.

Item Reversals and Recoding Three items (Q14, Q17 and Q18) are reverse scored so that high scores indicate better outcomes. These items were recoded as follows: Q3 (1=5, 2=4, 3=3, 4=2, 5=1, 6=missing); Q6 (1=5, 2=4, 3=3, 4=2, 5=1); Q7 (1=6, 2=5, 3=4, 4=3, 5=2, 6=1). For Q4a, responses of 0 ("I do not work") were recoded to missing.

Imputing Missing Data Missing data are imputed according to the same algorithm recommended for scoring the SF-36. A person-specific estimate is imputed for any missing item in cases where the respondent answered at least 50 percent of the items in the scale.

Creating Summary Scores In many questionnaires, summary scores are created by simply adding up responses to questions in the scale, or in some cases by taking an average or mean of the responses. However, this method is not appropriate for use in this case as thesummary scales consist of questionnaire items with a varying number of response categories. In this case, it is methodologically unsound to simply sum the raw scores.

The standard method used to create summary scale scores uses z-score equivalents or transformations of raw scores. Raw scores are transformed to standard z-scores which can then be summed to form summary scales. In order to minimise the effect of missing data, a mean z-score is used rather than a total z-score. This is based on the sum of the z-score transformations of each item divided by the number of items in the scale. The program for calculating summary scale scores, based on the mean of the z- scores for items in the summary scale, allows inclusion of a questionnaire with 50% or less of missing data.

The summary scale scores, being the sum of n (where n is the number of non-missing items in the scale) Normally distributed variables, each with mean 0 and standard deviation 1, are Normally distributed with mean 0 and standard deviation √n. A further transformation of these summary scale scores to standard z-scores is therefore required.

Because transforming raw scores to z-scores generates negative scores which are not readily interpretable, z-scores are transformed to T-scores for reporting purposes. T- scores are based on a mean of 50 and a standard deviation of 10 to give an easily understood range of scores.

References 1. Lamping DL, Schroter S for the VEINES Group. Measuring quality of life and symptoms in chronic venous disorders of the leg: Development and psychometric evaluation of the VEINES-QOL/VEINES-SYM questionnaire. Report to McGill University, 1998. 2. Lamping DL, Schroter S, Kurz X, Kahn SR, Abenhaim L. Evaluating outcomes in chronic venous disorders of the leg: Development of a scientifically rigorous, patient-reported measure of symptoms and quality of life. Journal of Vascular Surgery 2003;37(2):410-19. 3. Dillman DA. Mail and telephone surveys: The total design method. New York: Wiley, 1978. 4. Ware JE, Snow KK, Kosinski M, Gandek B. SF-36 Health Survey: Manual and interpretation guide. Boston: The Health Institute, New England Medical Centre, 1993. 5. Ware JE, Kosinski M, Keller SD. SF-36 physical and mental health summary scales: A user's manual. Boston: The Health Institute, New England Medical Center, 1994. 6. Streiner DL, Norman GR. Health measurement scales: A practical guide to their development and use (2nd ed). Oxford: Oxford University Press, 1995.

VEINES-QOL SPSS SCORING PROGRAMME

Part A: DEFINES VARIABLE LABELS & RECODES OUT OF RANGE SCORES

Part B: RECODES SPECIFIC VARIABLES TO MEASURE IN THE SAME WAY. LOW SCORE = BAD HEALTH.

Part C: TURNS ALL THE RAW SCORES TO Z SCORES

Part D: CREATES THE SCALE SCORES IF PATIENT ANSWERED AT LEAST 50% OF QUESTIONS IN SCALE.

Part E: TURNS THE SCALE SCORES (WHICH ARE NORMALLY DISTRIBUTED WITH A MEAN OF 0 AND STANDARD DEVIATION OF SQRT(N), WHERE N IS THE NUMBER OF NON- MISSING RESPONSES) TO Z SCORES (I.E. NORMALLY DISTRIBUTED WITH A MEAN OF 0 and STANDARD DEVIATION OF 1)

Part F: CREATES T SCORES (MEAN 50, STANDARD DEVIATION 10)


PART A

COMMENT PART A.
VARIABLE LABELS q1a 'Heavy legs' .
VARIABLE LABELS q1b 'Aching legs ' .
VARIABLE LABELS q1c 'Swelling' .
VARIABLE LABELS q1d 'Night cramps' .
VARIABLE LABELS q1e 'Heat or burning sensation' . VARIABLE LABELS q1f 'Restless legless' . VARIABLE LABELS q1g 'Throbbing' .
VARIABLE LABELS q1h 'Itching' .
VARIABLE LABELS q1i 'Tingling sensation' .
VARIABLE LABELS q3 'Compared to one year ago how would you rate your leg problem' . VARIABLE LABELS q4a 'Daily activities at work' .
VARIABLE LABELS q4b 'Daily activities at home' .
VARIABLE LABELS q4c 'Standing for long periods' .
VARIABLE LABELS q4d 'Sitting for long periods' .
VARIABLE LABELS q5a 'Cut down time spent on work' .
VARIABLE LABELS q5b 'Accomplished less' .
VARIABLE LABELS q5c 'Limited in kind of work' .
VARIABLE LABELS q5d 'Difficulty performing work' .
VARIABLE LABELS q6 'Interference with normal social activities' .
VARIABLE LABELS q7 'Intensity of leg pain' .
VARIABLE LABELS q8a 'Concerned about appearance of leg(s)' .
VARIABLE LABELS q8b 'Felt irritable' .
VARIABLE LABELS q8c 'Felt a burden' .
VARIABLE LABELS q8d 'Worried about bumping into things' .
VARIABLE LABELS q8e 'Appearance of leg(s) influenced choice of clothing' .
VARIABLE LABELS q2 'Time of day leg problem most intense' .
RECODE
q1a q1b q1c q1d q1e q1f q1g q1h q1i q6 (1=1) (2=2) (3=3) (4=4) (5=5) (ELSE=SYSMIS) .
EXECUTE .
RECODE
q2 q3 q7 q8a q8b q8c q8d q8e (1=1) (2=2)
(3=3) (4=4) (5=5) (6=6) (ELSE=SYSMIS) . EXECUTE .
RECODE
q4a (0=0) (1=1) (2=2) (3=3) (ELSE=SYSMIS) .
EXECUTE .

RECODE
q4b q4c q4d (1=1) (2=2) (3=3) (ELSE=SYSMIS) .
EXECUTE .
RECODE
q5a q5b q5c q5d (1=1) (2=2) (ELSE=SYSMIS) .
EXECUTE . 

Part B

COMMENT PART B.

RECODE
q3 (6=SYSMIS) (1=5) (2=4) (4=2) (5=1) .
EXECUTE .
RECODE
q6 (1=5) (2=4) (4=2) (5=1) .
EXECUTE .
RECODE
q7 (1=6) (2=5) (3=4) (4=3) (5=2) (6=1) .
EXECUTE .
RECODE
q4a (0=SYSMIS) .
PART B
EXECUTE . 

PART C

COMMENT PART C.
DESCRIPTIVES
VARIABLES=q1a q1b q1c q1d q1e q1f q1g q1h q1i q2 q3 q4a q4b q4c q4d q5a q5b q5c q5d q6 q7 q8a q8b q8c q8d q8e /SAVE
/STATISTICS=MEAN STDDEV MIN MAX .

PART D

COMMENT PART D.

* VEINES-SYM SCALE

RECODE
zq1a zq1b zq1c zq1d zq1e zq1f zq1g zq1h zq1i zq7 (SYSMIS=0).
EXECUTE .

COUNT score1 =zq1a zq1b zq1c zq1d zq1e zq1f zq1g zq1h zq1i zq7 (0) .
EXECUTE .

COMPUTE denom1= (10 - score1) .
EXECUTE .
IF (denom1 >= 5) zsympmn = (zq1a + zq1b + zq1c + zq1d + zq1e + zq1f + zq1g + zq1h + zq1i + zq7) / denom1 .
EXECUTE .

* VEINES-QOL SCALE

RECODE
zq1a zq1b zq1c zq1d zq1e zq1f zq1g zq1h zq1i zq3
zq4a zq4b zq4c zq4d zq5a zq5b zq5c zq5d zq6 zq7 zq8a zq8b zq8c zq8d zq8e (SYSMIS=0).
EXECUTE .

COUNT
score3 =zq1a zq1b zq1c zq1d zq1e zq1f zq1g
zq1h zq1i zq3 zq4a zq4b zq4c zq4d zq5a zq5b zq5c
zq5d zq6 zq7 zq8a zq8b zq8c zq8d zq8e (0) .
EXECUTE .
COMPUTE denom3 = (25 - score3) .
EXECUTE .
IF (denom3 >= 13) zvqolmn = (zq1a + zq1b + zq1c + zq1d + zq1e + zq1f + zq1g + zq1h + zq1i + zq3 + zq4a + zq4b + zq4c + zq4d + zq5a + zq5b + zq5c + zq5d + zq6 + zq7 + zq8a + zq8b + zq8c + zq8d + zq8e) /denom3 .
EXECUTE .

RECODE
zq1a zq1b zq1c zq1d zq1e zq1f zq1g zq1h zq1i zq7 zq2
zq3 zq4a zq4b zq4c zq4d zq5a zq5b zq5c zq5d zq6 zq8a zq8b
zq8c zq8d zq8e (0=SYSMIS) .
EXECUTE .

PART E

COMMENT PART E.
DESCRIPTIVES VARIABLES=ZSYMPMN (ZSYMSCOR),ZVQOLMN (ZQOLSCOR)/ STATISTICS=MEAN,STDDEV,MIN,MAX.
EXECUTE.

DESCRIPTIVES VARIABLES=ZSYMSCOR,ZQOLSCOR. 

PART F

COMMENT PART F.

COMPUTE TVSYM = 50 + (zsymscor * 10) .
EXECUTE .
COMPUTE TALL = 50 + (zqolscor * 10) .
EXECUTE .

VARIABLE LABELS tvsym 'VEINES-SYM score' .
VARIABLE LABELS tall 'VEINES-QOL score' .

DESCRIPTIVES
VARIABLES=tvsym tall
/STATISTICS=MEAN STDDEV MIN MAX .

Solution

  • From what I see Zscores are supposed to be created in the descriptives /save command in part C. If for some reason your data is empty at that point (as the error message suggests), no Zscores would be created, and then further commands looking for the nonexistant Zscores would give you the message about incorrect variable names.