7.1 Score Transformations: SPSS syntax


get file="fulldata.sav".
* This file has the original and new occupational unit values, 
* indicators of pseudo-diagonality, and the derived CAMSIS scale values.
* (ie as in the example for section 6.3 above).
* the 'raw' scores from the association models are in variables {h/w}i{t/s}d1.

* note that in some cases care should be taken that the differently derived
* original scales all have the same positive to negative ranking - it could be 
* the case that different versions have comparable structures but some have
* been arbitrarily reversed in their magnitude, in which case it is sensible to 
* re-sign the data to a consistent schema.



** 1) Mean Standardisation plus range cropping : 
* THIS IS THE METHOD USED IN ALL CAMSIS VERSIONS DISTRIBUTED FROM THIS SITE.
* standard normal transformation, mean 50, standard deviation 15.
* precision 1 decimal point and range cropped to 1 to 99.
* (since standardisation reflects population distribution, we must use weights).

* Use total sample weights rather than non-pseudos only :.
* also assumes that any cases with missing 'raw' scores are recognised by SPSS as missing. 

weight by freq. 
descriptives var=htd1 wtd1 hsd1 wsd1 
  /save /statistics=all .
* (creates by default standard normal vars, mean 0 sd 1, prefixed by z).
descriptives var=zhtd1 zwtd1 zhsd1 zwsd1 /statistics=all. 
* then generate to fit within desired range and precision :.
compute hitcs=(trunc(10*((15*zhitd1)+50)) )/10.
compute witcs=(trunc(10*((15*zwitd1)+50)) )/10.
compute hiscs=(trunc(10*((15*zhisd1)+50)) )/10.
compute wiscs=(trunc(10*((15*zwisd1)+50)) )/10.
descriptives var=hitcs witcs hiscs wiscs /statistics=all. 
* finally, 'crop' any extreme values that exist. 
recode hitcs witcs hiscs wiscs (lo thru 1=1) (99 thru hi=99).
descriptives var=hitcs witcs hiscs wiscs /statistics=all. 
weight off. 



** 2) Range transformations (all values to be integers, range 1 to 999).
* (range transformations independent of population distribution, so don't need weights).
* [THIS IS INCLUDED AS AN EXAMPLE BUT IS NO LONGER THE PREFERRED CAMSIS METHOD].

compute valone=1.
aggregate outfile="mtch3.sav" /break=valone
  /htd1ma=max(htd1) /htd1mi=min(htd1)
  /wtd1ma=max(wtd1) /wtd1mi=min(wtd1)
  /hsd1ma=max(hsd1) /hsd1mi=min(hsd1)
  /wsd1ma=max(wsd1) /wsd1mi=min(wsd1).
match files file=* /table="mtch3.sav" /by=valone.
* the above is run to automate identification of minimum and maximum values.
compute htd1cs=trunc ( 999 - ( (htd1ma - htd1)*(998 / (htd1ma - htd1mi) ) ) ).
compute wtd1cs=trunc ( 999 - ( (wtd1ma - wtd1)*(998 / (wtd1ma - wtd1mi) ) ) ).
compute hsd1cs=trunc ( 999 - ( (hsd1ma - hsd1)*(998 / (hsd1ma - hsd1mi) ) ) ).
compute wsd1cs=trunc ( 999 - ( (wsd1ma - wsd1)*(998 / (wsd1ma - wsd1mi) ) ) ).
* these commands compute the range transformed values.
descriptives /var=htd1cs wtd1cs hsd1cs wsd1cs /statistics=all.
weight by freq. 
descriptives /var=htd1cs wtd1cs hsd1cs wsd1cs /statistics=all.
*note that the population mean value of these scores doesn't mean much anymore.
weight off. 


sav out="fulldataandscores.sav".


 
Return to Score transformation