1 / 69

Getting Started with SPSS

Learn how to navigate SPSS, create new data files, import data, recode variables, and produce plots and summaries. Download workshop materials for hands-on practice.

pchapman
Download Presentation

Getting Started with SPSS

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. Getting started with SPSSDr Jenny FreemanMathematics & Statistics HelpUniversity of Sheffield

  2. Learning outcomes By the end of this session you should understand: • The different windows in SPSS • The difference between Data View and Variable View By the end of this session you should be able to: • Open SPSS and create a new data file • Read data in from existing files, both SPSS and EXCEL • Recode data to create new variables • Produce simple plots, data summaries and tables • Edit plots • Save files and output

  3. Download the slides and data In your web browser, type in the following address and save the files to your computer: http://www.sheffield.ac.uk/mash/workshop_materials

  4. Recap: Data types

  5. Recap: Data types

  6. Questionnaire Q1: Which of these colours do you like most? Q2: I love maths: Q3: How long did it take you to travel here today, in minutes? • What data types are these? • How do we put these data into SPSS?

  7. Entering data into SPSS • When entering information into SPSS need to code it numerically. Can then label it to make this understandable • Note that for ‘Colour’ and ‘ Love maths’, this does not make them numerical! Colour = 5 blue 2 = Disagree

  8. Open SPSS • Get IBM SPSS Statistics from ‘All programs’ Select ‘New Dataset’

  9. Data View • It opens in Data View window • This is where you input your data

  10. Variable View The Variable View window allows you to create variables, name them, select their type, code missing values and create labels for different values

  11. Variable View Give variables names and labels Label appears in output 0 decimals for integers No gaps or symbols String means words

  12. Value labels • Give the numbers labels • Click on the blue box • Enter the value label for each number, then ‘Add’ until all numbers are labelled

  13. Missing values You can give missing values a particular value e.g. -99, and in the labels tab you can then label then e.g. -99=did not finish, -98= not applicable Missing values can be identified in the same way as value labels

  14. Entering data into SPSS One variable per column One row per subject

  15. Data types Some operations in SPSS can only be performed on certain data types Choose the right data type using the measure column

  16. Recoding variables: Automatic recode • You can use the ‘Automatic Recode’ function to recode string variables into numeric variables, such as the Gender variable you have created Transform  Automatic Recode  … • It will assign numbers for the data in aphabetical order e.g. F = 1; M = 2

  17. File  Save as Save the dataset as an SPSS file using File  Save as SPSS data files end in .sav

  18. Exercise 1: Entering data into SPSS • Open SPSS and select ‘New Dataset’ from the options • Go to ‘Variable View’ and create the dataset template for inputting the 5 variables on the handout: ID, Colour, Maths, Time, Gender • Input the data, creating numeric codes for ‘Favourite colour’ and ‘Love_maths’. Input ‘Gender’ as a string variable • Use Automatic recode to create a new Gender variable with numeric codes rather than the string variable

  19. Opening an Excel file: Titanic data • The ship Titanic sank in 1912 with the loss of most of its passengers • Data are available on 1309 passengers and crew on board the ship Titanic

  20. Opening an Excel file Open the Excel file ‘SPSS_workshop_data’ File  Open  Data Select Excel from the ‘Files of type’ menu and then select the Excel file required and ‘Open’

  21. Opening an Excel file • SPSS only opens one sheet at a time so if there are multiple worksheets, make sure you are opening the correct sheet. Note: There must only be one header row in Excel • Give the variables and values suitable labels (see next slide), and choose the right data types

  22. Opening an Excel file Suggested labels

  23. File  Save as Save the dataset as an SPSS file using File  Save as SPSS data files end in .sav

  24. Exercise 2: Titanic Which variables could be used to investigate whether ‘wealthy’ people were more likely to survive?

  25. Summarising categorical data in SPSS

  26. Summarising categorical data • %’s are preferable unless there are small frequencies • Bar/ pie charts for one categorical variable • Contingency tables and stacked/ multiple bar charts for assessing relationships between 2 categorical variables • Research question: Who are the most dangerous drivers in Britain?

  27. Exercise 3: Dangerous drivers Is there a relationship between age, gender and accidents? Could this data display be improved?

  28. Frequencies How many people were travelling in each class? Analyze Descriptive Statistics  Frequencies Move class from the left to the right hand side using the middle arrow, then ‘OK’

  29. Output window Charts and tables appear in a separate window in SPSS

  30. File  Save as Output files are saved separately to the data Give the output file a sensible name e.g. Titanic summary statistics

  31. Were class and survival related? Analyze Descriptive Statistics  Crosstabs Move class to ‘Row’ and survived to ‘Columns’ using the arrow • Select ‘Cells’ to get the % options • Choose ‘Row’ to get summary percentages across the rows

  32. Crosstabulation Who was most likely to die?

  33. Graph menu Graphs  Legacy dialogs  Bar Charts for categorical data Charts for scale data

  34. Variable across the x-axis (Class): Different bars Stacked bar chart Graphs  Legacy Dialogs  Bar Variable to split the bars (survived)

  35. Editing the chart Double click on the chart to open the editing window

  36. Changing the font size • The font is often too small so change it to 12 on the axes and 14 for the title • Click on the words on the bottom • Select font 12 • Repeat for other labels

  37. Changing the colours Double click on one of the bars, then single click on the one of the bar sections that you want to change the colour of

  38. Changing the colours Select Fill & Border from the properties menu Change the fill colours of the bars Change the border colour Change the pattern Click Apply after each change

  39. Further options for editing Turn bars to 100% Add a title Add data labels Double click on bar to open properties window to change colour

  40. Changing the labels • To edit the labels, click to access the properties window and select ‘Data Value Labels’ • Move: ‘Percent’ up ‘Count’ down • Use the ‘Number format’ tab to display to 0 decimal places and increase font size to at least 12 Click twice with a gap between to change the axis label from ‘Count’ to ‘Percentage’

  41. Copying to Word • Close the editing window and return to the Output window • You can save the output file with everything in but it’s better to take charts to Word and write up as you go along • Right click on the chart and select Copy then paste as a picture in Word Did class affect survival?

  42. Exercise 4: Survival of the pushiest? • Are American’s more likely to survive when a boat sinks? Produce a suitable summary table and stacked barchartto investigate this http://www.independent.co.uk/news/world/australasia/more-britons-than-americans-died-on-titanic-because-they-queued-1452299.html

  43. Summarising continuous data

  44. Recap: Data types

  45. Exercise 5: Compare genders The number of haircuts a year for a sample of people was summarised: On average who gets more haircuts a year and which gender is more spread out? Do the means and medians look similar for each gender?

  46. Summary statistics in SPSS There are numerous options for summarising data through the Analyse menu in SPSS

  47. Exercise 6: Use Explore to comparethe cost of ticket by survival • Use Explore to get summary statistics and histograms of Cost of ticket by Survival status • Analyze Descriptive Statistics  Explore

  48. Exercise 6: Use Explore to comparethe cost of ticket by survival • Which summary statistics should be used? • Interpret the output: how do the two groups (those who died and who survived) compare? • Use the histograms to decide which summary measures to use

  49. Histograms A histogram shows the spread of the data Graphs  Legacy Dialogs  Histogram To produce histograms separately for the two groups, move ‘Survived’ into the Rows, to stack them on top of each other or into Columns to have them side-by-side

  50. Histograms The data are very skewed. Most people spent very little on their tickets but a few spent a lot Use medians and interquartile range to summarise skewed data

More Related