Presentation is loading. Please wait.

Presentation is loading. Please wait.

Clods’ Guide 2 Pre-course questionnaire Exercises on full cumulative data 1.

Similar presentations


Presentation on theme: "Clods’ Guide 2 Pre-course questionnaire Exercises on full cumulative data 1."— Presentation transcript:

1 Clods’ Guide 2 Pre-course questionnaire Exercises on full cumulative data 1

2 2 La mise en place (3 – 10) Read in your data (11 – 20) Save your work! (21 – 31) Label your variables (33 – 53) Label the values of your variables (54 - (except Scale) Slide guide

3 3 1: La mise en place

4 4 Is SPSS still open? If so, is your file myclass0.sav still open?

5 5 If not, open folder myclass.. and double-click on

6 6 SPSS data file myclass0.sav

7 7 Open a new Data Editor

8 New Data Editor in 8.. but we also need to open a new Syntax Editor

9 9

10 New SPSS Syntax Editor 10

11 11 2: Read in your data

12 data list file 'e:\myclass.txt' records 1 /1 serial 1-2 v4 to v8 4-8 v10 to v12 10-12 v14 14 v16 to v20 16 - 20 sex 22 v24 24 age 26-27 metres 29-32 (2) feet 34 inches 36-37. Type or copy/paste the following into the Syntax Editor The data list command must start in the first column. All subsequent lines should be inset by at least one space. Don’t forget the full stop at the end! 12

13 If data list is blue, the command is complete: if it’s red, you probably forgot the forward slash / or the full stop. ! Click on the green triangle in the tool bar 13

14 Data List will read 1 records from e:\myclass.txt variable Rec Start End Format serial 1 1 2 F2.0 v4 1 4 4 F1.0 v5 1 5 5 F1.0 v6 1 6 6 F1.0 v7 1 7 7 F1.0 v8 1 8 8 F1.0 v10 1 10 10 F1.0 v11 1 11 11 F1.0 v12 1 12 12 F1.0 v14 1 14 14 F1.0 v16 1 16 16 F1.0 v17 1 17 17 F1.0 v18 1 18 18 F1.0 v19 1 19 19 F1.0 v20 1 20 20 F1.0 sex 1 22 22 F1.0 v24 1 24 24 F1.0 age 1 26 27 F2.0 metres 1 29 32 F4.2 feet 1 34 34 F1.0 inches 1 36 37 F2.0 14

15 *Untitled in [NB: In the Measure column, all levels are Unknown 15

16 *Untitled in Data cells are empty because SPSS has not yet made a pass through the data, but your variable names appear in the column headers 16

17 Go back to the Syntax Editor and add the command: execute. If execute is blue, the command is correct: Click on the green triangle in the tool bar 17

18 *Untitled has filled up 18

19 *Untitled in.. and the levels have changed in the Measure column 19

20 Level (of measurement) is assigned automatically by SPSS (via a “heuristic” algorithm) and is dependent on the range of values encountered in the data pass. variables metres and inches have been assigned to Scale because they have many values, but so has serial (which is technically Nominal). Some of the variables should be Ordinal, but these need to be specified by you, either directly in the Data Editor (which leaves no audit trail) or by using syntax (which does). 20

21 SAvE YOUR WORK ! 21

22 22 File names Within the same project it’s good practice to use file names with a root indicating the topic, an incremental number to indicate the version and an extension for the type of file. For this project we are using the root myclass. myclass0.txt myclass0.sps myclass0.sav We are working in a folder called myclass and files will be called myclass. During file building, SPSS *Untitled and *Syntax files can be be saved with Once finalised they should be saved as myclass1.sav, myclass1.sav; myclass2.sav myclass2.sav using

23 To save a file with the same name use To save a file with a different name use 23

24 24 It doesn’t matter whether you are in

25 25.. or

26 Navigate to Change Untitled tomyclass1.. and click on 26 [NB: Window displays only files with *.sav extension: other files are not displayed]

27 File has been saved as myclass1.sav in folder myclass 27

28 28 File name has been changed to

29 Now save your syntax file 29

30 30

31 Navigate to folder myclass Change Syntax*tomyclass1.. and click on 31 [NB: Window displays only files with *.sps extension: other files are not displayed]

32 File myclass1.sps has been saved in folder myclass 32

33 33 The file name has changed to

34 4: Label your variables 34

35 35 Go back to myclass1.sav

36 36

37 37 SPSS opens new Syntax Editor

38 variable labels serial 'Serial number of questionnaire' /v4 'Q1 rank: Welfare State' /v5 'Q1 rank: Countryside' /v6 'Q1 rank: Defence and Nuclear Issues' /v7 'Q1 rank: Politics' /v8 'Q1 rank: Industry & Employment' /v10 'Q2a: Serious nuclear accident' /v11 'Q2b: Impossible for police to protect' /v12 'Q2c: Nuclear bomb dropped' /v14 'Q3: Satisfaction with running of NHS' /v16 'Q4: Typing' /v17 'Q4: Word-processing' /v18 'Q4: Social statistics' /v19 'Q4: Survey analysis etc' /v20 'Q4: Other computing' /sex 'Q5: Sex of respondent' /v24 'Q6: Main transport mode' /age 'Q8: Age last birthday' /metres 'Q7: Height in metres only' /feet 'Q7: Feet part of height' /inches 'Q7: Inches part of height'. Type (or copy/paste) this text into the Syntax Editor. variable labels may be in blue, but if you spell variable names wrong you’ll get an error message. SPSS can detect syntax errors, but not spelling mistakes in your labels. Make sure your labels are enclosed in primes. Don’t forget the full stop! Earlier versions of SPSS need variables to be separated by a forward slash / SPSS 22 works without them, but lack of the above is a common cause of errors. 38

39 Click on the green triangle in the tool bar 39

40 Your variable labels are now displayed in the Label column. Data Editor in 40

41 Save your work again! 41

42 Do not useIt will over-write the file 42

43 Navigate to folder myclass 43

44 Save the file with a different name (Good practice to use same root for *sps and *.sav and to add a number to indicate an increment for each version) Change myclass1 to myclass2 Click on 44

45 File myclass2.sav has been saved in folder myclass 45

46 File name changes to myclass2.sav 46

47 Now save your syntax file 47

48 48

49 49

50 50 Save the file with a different (incremental) name Change syntax* to myclass2

51 51 Syntax file has been saved as myclass2.sps in folder myclass

52 52 File name has changed to

53 53

54 4: Specify value labels 54

55 55

56 56 value labels v10 to v12 1 'very likely' 2 'Quite likely' 3 'Not very likely' 4 'Not likely' /v141 'very satisfied.' 2 'Quite satisfied.' 3 'Neither' 4 'Quite dissatisfied' 5 'very dissatisfied' /v161 'Typing' 2 'Word- process' 3 'Social statistics' 4 'Survey analysis' 5 'Other' /sex1 'Male' 2 'Female' /v241 'Public transport' 2 'Car' 3 'Motor cycle or cycle' 4 'Walk'. Type (or copy/paste) this text into the Syntax Editor. value labels may be in blue, but if you spell variable names wrong you’ll get an error message. SPSS can detect syntax errors, but not spelling mistakes in your labels. variables need to be separated by a forward slash / Make sure your labels are enclosed in primes. Don’t forget the full stop!

57 57 Click on the green triangle in the tool bar

58 58 Your labels are displayed in the values column

59 59 Widen the Label and values columns

60 60 Only the label for the lowest value is displayed

61 61 If you want to see all the value labels for a variable, click on a cell, You can use this box to write or edit value labels, but it takes forever. Syntax is easier and much quicker then on the blue box

62 62 Save your work again!

63 63

64 64 Navigate to myclass

65 65 Save the file with a different (incremental) name Change myclass2 to myclass3 Click on

66 66 File is saved as myclass3.sav in folder myclass

67 67 File name changes to myclass3.sav

68 68 Now save your syntax file

69 69

70 Save the file with a different (incremental) name Change syntax* to myclass3 Navigate to Click on 70

71 71 As you type, SPSS displays a list of other files in the same folder have the same root:

72 72 File has been saved as in folder myclass

73 73

74 74 Job done!


Download ppt "Clods’ Guide 2 Pre-course questionnaire Exercises on full cumulative data 1."

Similar presentations


Ads by Google