1 / 34

GAP Toolkit 5 Training in basic drug abuse data management and analysis

GAP Toolkit 5 Training in basic drug abuse data management and analysis. Training session 7 SPSS: Recode and Compute. Objectives. To introduce and demonstrate SPSS tools for recoding variables and creating new variables To introduce and demonstrate the use of SPSS command syntax

Download Presentation

GAP Toolkit 5 Training in basic drug abuse data management and analysis

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. GAP Toolkit 5Training in basic drug abuse data management and analysis Training session 7 SPSS: Recode and Compute

  2. Objectives • To introduce and demonstrate SPSS tools for recoding variables and creating new variables • To introduce and demonstrate the use of SPSS command syntax • To introduce and demonstrate Help features in SPSS from a dialogue box

  3. Types of recode • A categorical variable into a new set of categories • A continuous variable into a categorical variable

  4. Recode approaches • Into pre-defined categories of interest • Into categories of equal size

  5. Example: pre-defined categories • Recode weekly expenditure on drugs into the following categories: • Low expenditure <= £100 a week • High expenditure >= £101 a week

  6. select variable for recoding and click

  7. click here to map old  new values

  8. Weekly drug expenditure

  9. Example: quantiles • Recode weekly expenditure into the following: • 4 categories, each with approximately the same number of cases (quartiles) • 10 categories, each with approximately the same number of cases (deciles)

  10. NTILES of Expend

  11. NTILES of EXPEND

  12. Compute • Creates new variables using: • Standard mathematical operators • A full range of functions • Conditional statements

  13. Transform/Compute click here to define variable type

  14. Type and Label

  15. Yexpend=Expend*52

  16. Explore: Yexpend Descriptives

  17. Example 2: Age • Convert date of birth to age in years

  18. (DATE.DMY(01,01,2002) - dob) / (365.25*24*60*60)

  19. Explore: Age Descriptives

  20. Help • Context-sensitive Help: • Right click on any part of a dialogue box to obtain help • Dialogue box Help button

  21. Command language • Command-line rather than Windows interface • More flexible • Reusable • Saved as text files

  22. Syntax window • Enter SPSS commands: • Type directly • Paste from a dialogue box • Run SPSS commands • Save as a text file

  23. The Paste button click to copy command into Syntax Window

  24. The Run menu

  25. Syntax for Age

  26. Recode: Into same variable Into different variable Compute: Mathematical operators Functions Dialogue box Help: Context-sensitive Help Dialogue box Help button Command language: Syntax Window Dialogue box Paste button Summary

More Related