Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part 4 Syntax or point-and-click?. British Social Attitudes 1986 Q.114, page 43b.

Similar presentations


Presentation on theme: "Part 4 Syntax or point-and-click?. British Social Attitudes 1986 Q.114, page 43b."— Presentation transcript:

1 Part 4 Syntax or point-and-click?

2 British Social Attitudes 1986 Q.114, page 43b

3 Open blank data file

4 Open a new syntax file and write: title 'Page 43b of BSA 1986'. data list file 'f:bsa86.dat' records 23 /15 v1508 8-9 v1510 10 v1511 11 v1512 12-13.

5 Page 43b of BSA 1986 Data List will read 23 records from F:\bsa86.dat Variable Rec Start End Format V1508 15 8 9 F2.0 V1510 15 10 10 F1.0 V1511 15 11 11 F1.0 V1512 15 12 13 F2.0 SPSS reports how data will be read

6 Data editor fills Name Type Width and Decimals columns

7 var labels v1508 'Q105a Household size‘ v1510 'Q105b Marital status‘ v1511 'Q106a Sex of respondent‘ v1512 'Q106b Age of respondent last birthday'. value labels v1510 1 'Married‘ 2 'Living together‘ 3 'Sep or div‘ 4 'Widowed‘ 5 'Not married' 8 'DK' 9 'N/A‘ /v1511 1 'Men' 2 'Women'. save out 'f:page43b.sav'. Now write: missing values v1508 v1512 (98,99) v1510 (8,9).

8 Data editor fills Missing column

9 and Label and Values columns page43b.sav has also been saved to drive f:

10 Adjust column widths to see what you've got

11 What's in the file?

12 Utilities…Variables lets you slide up and down, but that's all

13 Utilities…File info.. sends (too much) file information to output

14 What point-and-click can’t do

15 display.

16 display labels.

17 display variables.

18 V2018 V2019 V2020 V2021 V2022 V2023 2 2 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 3 1 2 3 2 4 3 2 2 3 8 4 8 Number of cases read: 5 Number of cases listed: 5 list list v2018 to v2023 /cases 5.

19 A useful trick

20 Using COMPUTE to generate groups Instead of using IF or DO IF… END IF… Use compute and recode Check frequencies Run crosstab Compute newvar=var1*10 + var2 Recode into desired groups

21 Bloomsbury and Islington Health and Lifestyle survey 1988 freq var v670 v715. cro v715 by v670. Check frequencies and run a crosstab with:

22 Frequency count for component variables

23 Intermediate crosstab

24 Create new variable with: compute famstat=v670*10+v715. recode famstat (21 24 25 26=1) (22 23=2) (11 14 15 16=3)(12 13=4) (else=sysmis). value labels famstat 1 'Single: no kids' 2 'Couple: no kids' 3 'Single: + kids' 4 'Couple: + kids'. freq var famstat.

25 Frequency count for new variable

26 Another useful trick

27 Using COMPUTE to recode To reverse values on items in a scale Add 1 to the highest code value Subtract the item value from this figure eg: Agree – Disagree scale coded 1-5 Subtracting the item value from 6 reverses it

28 And one more

29 Using MEANS to get % Choose a value or values to investigate Recode these to 100 and everything else to zero Run MEANS The figures are percentages and the row totals are the base n

30 …and now Let Battle Begin!


Download ppt "Part 4 Syntax or point-and-click?. British Social Attitudes 1986 Q.114, page 43b."

Similar presentations


Ads by Google