54
Basic medical statistics for clinical and experimental research Introduction to SPSS – S0 29 November 2019 Anna Morra [email protected] Slides of Katarzyna Jóźwiak

Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Basic medical statistics for clinical and experimental research

Introduction to SPSS – S0

29 November 2019

Anna [email protected]

Slides of Katarzyna Jóźwiak

Page 2: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Introduction

• SPSS = Statistical Package for the Social Sciences• Very user friendly software for editing and analyzing all sorts of data

• After opening SPSS, two windows appear: • Data Editor with two spreadsheets:

• Data View• Variable View

• Output

Page 3: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor

• SPSS Data View: displays our data values; columns represent variables, rows represent subjects/patients

Page 4: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor

• SPSS Variable View: displays information regarding the meaning of our data, list of all variables, characteristics of all variables

Page 5: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor

SPSS Variable View: displays information regarding the meaning of our data, list of all variables, characteristics of all variables

• Label: description of the variable in the dataset• Values: coding• Missing: 99=unkown• Measure:

• scale (it is a numeric continuous variable) • ordinal (categorical with an order between categories, i.e. tumor grade, tumor stage)• nominal (categorical with no order between categories, i.e. ethnicity)

Page 6: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor: File

• New: to create new data set, syntax, output

• Open: to open existing dataset (format like .sav, .xls, .xlsx, .txt, .dta, .csv), syntax, output

• Save as: to save data (format like .sav, .csv, .xls, .xlsx, .dta)

Page 7: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor: Data

• Sort Cases: to sort by a specific variable

• Sort Variables: to sort by, e.g., variables names, types, widths

• Merge Files: to combine data sets by adding variables or subjects

• Split File: to split a data set into smaller data sets

• Select Cases: to indicate which subjects should be used in analyses

Page 8: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor: Transform

• Compute Variable : to compute a new variable

• Recode into Same Variables: to change values of an existing variable

• Recode into Different Variables: to change values of an existing variable and save the variable as an additional variable

Page 9: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor: Analyze

• All standard statistical analyses can be found here

Page 10: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data editor: Graphs• All standard graphical tools can be found here

Page 11: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data example

Page 12: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data example

Page 13: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data example

Page 14: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleMs L. Meulen has a unique patient number 7. She is 26 years old and has 3 children (she was pregnant 3 times). She is a diabetic with glucose level 78, blood pressure 50, BMI 31 and height 169 cm.

Page 15: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data example

What is the weight of the patients? 𝐵𝐵𝐵𝐵𝐵𝐵 =𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝐻𝐻𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊2 → 𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊 = 𝐵𝐵𝐵𝐵𝐵𝐵 ∗ 𝐻𝐻𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊2

Page 16: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleWhat is the weight of the patients? 𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊 = 𝐵𝐵𝐵𝐵𝐵𝐵 ∗ 𝐻𝐻𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊2

Page 17: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleWhat is the weight of the patients? 𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊 = 𝐵𝐵𝐵𝐵𝐵𝐵 ∗ 𝐻𝐻𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊2

Page 18: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleWhat is the weight of the patients?

Page 19: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 20: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 21: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 22: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 23: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 24: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 25: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the patients in out dataset?

Page 26: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set?

Page 27: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set?

Page 28: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set?

Page 29: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set?

Page 30: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set?

Page 31: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set? → we can first split the file based on the "Diabetes" variable

Page 32: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set? → we can first split the file based on the "Diabetes" variable

Page 33: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set? → we can first split the file based on the "Diabetes" variable

Page 34: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients and non-diabetic patients in our data set? → we can first split the file based on the "Diabetes" variable

Page 35: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → we can first select patients of interest

Page 36: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → we can first select patients of interest

Page 37: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → we can first select patients of interest

Page 38: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → we can first select patients of interest

Page 39: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → We make a histogram after selecting patients of interest

Page 40: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow old are the diabetic patients? → We make a histogram after selecting patients of interest

Page 41: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow to indicate that diabetic patients are younger or older than 40 years of age?→ create categorical variable with values: 1 = non-diabetics, 2 = diabetics with age < 40, 3

= diabetics with age ≥ 40

Page 42: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow to indicate that diabetic patients are younger or older than 40 years of age? → create categorical variable with values: 1 = non-diabetics, 2 = diabetics with age < 40, 3 = diabetics with age ≥ 40

Page 43: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow to indicate that diabetic patients are younger or older than 40 years of age? → create categorical variable with values: 1 = non-diabetics, 2 = diabetics with age < 40, 3 = diabetics with age ≥ 40

Page 44: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow to indicate that diabetic patients are younger or older than 40 years of age? → create categorical variable with values: 1 = non-diabetics, 2 = diabetics with age < 40, 3 = diabetics with age ≥ 40

Page 45: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow to indicate that diabetic patients are younger or older than 40 years of age? → create categorical variable with values: 1 = non-diabetics, 2 = diabetics with age < 40, 3 = diabetics with age ≥ 40

Page 46: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow many diabetics patients younger and older than 40 we have in our data set?

Page 47: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow many diabetics patients younger and older than 40 we have in our data set?

Page 48: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow many diabetics patients younger and older than 40 we have in our data set?

Page 49: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Data exampleHow many diabetics patients younger and older than 40 we have in our data set?

Page 50: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Syntax editorBehind all the "drop down menu steps" there is a list of commands that perform the statistical analyses and data manipulation

Page 51: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Syntax editorAll commands can be saved in a syntax editor file → while performing statistical analyses and data manipulation, push "Paste" button instead of "OK" button

Page 52: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Syntax editorAll commands can be saved in a syntax editor file → while performing statistical analyses and data manipulation, push "Paste" button instead of "OK" button

Page 53: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Syntax editorAll commands can be saved in a syntax editor file → while performing statistical analyses and data manipulation, push "Paste" button instead of "OK" button

Page 54: Introduction to SPSS – S0 · Introduction • SPSS = S tatistical P ackage for the S ocial S ciences • Very user friendly software for editing and analyzing all sorts of data

Syntax editorAny command from a syntax can be run separately by selecting the appropriate part and pushing "green arrow" button