1 / 18

Data Manipulation II Transforming, Recoding, and Splitting/Grouping

Data Manipulation II Transforming, Recoding, and Splitting/Grouping. SPSS Training Thomas V. Joshua , MS July 2012. College of Nursing. Lecture Overview. Transformation (computing) of Data Recoding Splitting/Grouping. Transformation (computing) of Data.

alvis
Download Presentation

Data Manipulation II Transforming, Recoding, and Splitting/Grouping

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Manipulation IITransforming, Recoding, and Splitting/Grouping SPSS Training Thomas V. Joshua, MS July 2012 College of Nursing

  2. Lecture Overview • Transformation (computing) of Data • Recoding • Splitting/Grouping

  3. Transformation (computing) of Data • SPSS has very powerful capabilities for creating new variables as a function of existing variables, for example • To create averages of existing variables • To rescale existing variables • To compute difference scores by subtracting one variable from another

  4. Computing A New Variable • Target Variable - new variable name. • Numeric Expression - defining the new variable, essentially giving SPSS a formula. • The variables in the Numeric Expression need to be either existing variables or numbers. • Specify the Type and Label for the new Variable.

  5. Conditionally Computing A New Variable • Variables can also be computed conditionally. For instance, if in the above example, you were only interested in the change in salaries for people who began working for the company within the last six years. • If… button (optional case selection condition)

  6. Transforming An Existing Variable • For example, the variable jobtime represents months of experience on the job, but we may wish to analyze data in terms of years on the job • Give a new variable name or keep the existing name for the Target Variable

  7. Recoding Variables • Another way to modify the values of existing variables in your dataset. In the Data Editor: Transform -> Recode • Into Same Variables option - changes the values of the existing variables. • Into Different Variables option - create a new variable with the recoded values. (not overwrite your original data) • Both options are essentially the same, except that recoding into a different variable requires you to supply a new variable name.

  8. Recoding Variables Categories to Categories For example, the variable jobcat codes an employee's status in three categories, but for a particular analysis you may want to combine two of these classifications into a single category. The original coding was • Clerical = 1 -> 1 • Custodial = 2 -> 2 • Manager = 3 -> 2

  9. Recoding Variables Input variable -> Output variable -> Change bottom -> Define the old and new values

  10. With System-missing selected • Without System-missing selected

  11. Recoding VariablesNumeric to Categories • Recode the continuous variable to the categorical variable • Useful in cross-tabulation • Group ranges of the variable into categories For example, we need to code an employee's current salary into two categories as the following Less than or equal to $27,000 (Low) -> 1 More than $27,000 (High) -> 2

  12. Recoding VariablesNumeric to Categories

  13. Where is the value 27,000? • How about if there are more than 2 groups?

  14. Splitting/Grouping • In some situations, you may want to perform the same analysis on different groups within the same dataset. • Analyses such as these can be conducted by first selecting the Split File function from the Data menu in the Data Editor: Data -> Split File...

  15. Splitting/Grouping If you select the option to "Sort the file by grouping variable," SPSS will run the "Sort File" command in the background. Because the split file command remains in effect indefinitely, you should reset this option when you no longer want a split file analysis.

  16. Splitting/Grouping • The Compare groups and Organize output by groups result in the same values in the output, regardless of the analysis being performed, but they differ in the way in which the output is presented. • Compare groups SORT CASES BY gender . SPLIT FILE LAYERED BY gender .

  17. Splitting/Grouping SORT CASES BY gender . SPLIT FILE SEPARATE BY gender . • Organize output by groups Gender = Female Gender = Male

  18. Thank You

More Related