90 likes | 217 Views
Psyc.301 SPSS Lab Session Spring 2014. Data screening & Transformation. Recode. To recode negatively worded items To collapse continuous variables into categorical ones Recode into same variable Recode into different variable Recoding negatively worded scale items
E N D
Psyc.301SPSS LabSessionSpring 2014 Data screening & Transformation
Recode • To recode negatively worded items • To collapse continuous variables into categorical ones • Recodeintosamevariable • Recodeintodifferentvariable • Recodingnegativelywordedscaleitems • Transform ─ Recode into SAME variables (to overwrite original data) • Select variables and move it to Variables box(k1, k6, k7, k8, k10, k13, k15, and k16 in week3 dataset.savdata) • Click on Old and New Values • Type old value in old value box new value in new value box and click Add • Repeat the last step for the remaining values to be changed • Click on Continue and Ok
To collapse a continuous variable • Transform ─ Recode into different variables (to retain original data) • Select variable and move it to Numeric Variable-Output Variable box • Type a new name in name box and a new label in label box, and click on change • Click on Old and New Values • Click on second Range and type the median in the box • Type new value in new value box and click Add • Click on third Range, type the median plus 1 in the box • Type new value in new value box and click Add • Click on Continue and Ok
Compute • Usuallytoobtaincompositescores of items Example: ksscscaleitems.sav • Computeif … («computeifcertaincondition is met»)
COMPUTE (example of calculating a total score) • Transform─ Compute variable • Type a name in Target Variable box • Select variables and move to Numeric expression box, click on + • Select other variables and repeat the same step by clicking on + • click on Ok • New composite variable is added to the data • COMPUTE IF… • Transform─ Compute variable • Type a name in Target Variable box • Select variables and move to Numeric expression box, click on + • Select other variables and repeat the same step by clicking on + • Click on If, select Include if case satisfies condition, • Select the relevant variable and move it to the box, select the required operator button • click on Continue and Ok
Descriptivestatistics • Mean • Mode • Median • Standarddeviation • Normalitymeasures: skewnesskurtosis • Normal distribution • Negativelyskeweddistribution • Positivelyskeweddistribution • Histogram
Select cases • Ifyouwanttoanalyzeonly a part of thedatasetwhichmets a certaincondition • Selection of specified cases using the If option • Selection of a random sample of cases using the Sample option • Selection of cases based on time or case range using the Range option • Example: Select the first 5cases for the analysis: • Data ─ Select cases ─ If condition is satisfied ─ If • Select the relevant variable and move it to the box • Click on the relevant operator to add it into the box • Type if any other values are required (example: id<=5) • Click on Continue and Ok • The cases after 5are crossed in the data, analysis can be conducted by using only the first 5cases • Example 2: Selectingfemalecases • Example 3: Selectingthosehavingdepressionscoresabove 16.