Slide 1

Slide 1 text

Variables and cases SPSS LABORATORY 2

Slide 2

Slide 2 text

INDEX 1. Previous lecture recap 2. Calendar 3. What is a Dataset 4. Variable view

Slide 3

Slide 3 text

Photo: Startup Weekend Hackathon. Nov.2014 LAST WEEK RECAP ■ Downloaded, installed and activated SPSS ■ Imported Music-1.xlsx dataset Still having problems installing SPSS? ○ Book an appointment for office hour (Thursday, 12.30 - 1.20) ○ Tech problem? Email [email protected]

Slide 4

Slide 4 text

Photo: Startup Weekend Hackathon. Nov.2014 SET UP SPSS ■ Launch SPSS. ■ Go to Canvas ○ Assignments > SPSS Lab 2 - Intro to SPSS ○ Download the Music-1 Dataset (in Excel, not PDF) ■ Import the dataset on SPSS ○ File > Import > Excel ○ Click OK in the preview window

Slide 5

Slide 5 text

Photo: Startup Weekend Hackathon. Nov.2014 WHAT IS A DATASET Cases Variables

Slide 6

Slide 6 text

Photo: Startup Weekend Hackathon. Nov.2014 WHAT IS A DATASET Population

Slide 7

Slide 7 text

Photo: Startup Weekend Hackathon. Nov.2014 A SURVEY DATASET Student ID Name Age Nationality GPA Height Eyes color 1324234 Rick 21 CA 3.2 181 Hazel 223423 Maria 22 US 2.1 160 Green 354353 Eddie 25 ES 3 176 Blue

Slide 8

Slide 8 text

Photo: Startup Weekend Hackathon. Nov.2014 A SURVEY DATASET Student ID Name Age Nationality GPA Height Eyes color 1324234 Rick 21 CA 3.2 181 Hazel 223423 Maria 22 US 2.1 160 Green 354353 Eddie 25 ES 3 176 Blue Participants Answers to survey questions

Slide 9

Slide 9 text

Photo: Startup Weekend Hackathon. Nov.2014 THE MUSIC-1 DATASET

Slide 10

Slide 10 text

Photo: Startup Weekend Hackathon. Nov.2014 WHAT IS A DATASET Songs Songs features

Slide 11

Slide 11 text

Photo: Startup Weekend Hackathon. Nov.2014

Slide 12

Slide 12 text

Photo: Startup Weekend Hackathon. Nov.2014 THE DATA VIEW WINDOW: VARIABLE VIEW

Slide 13

Slide 13 text

Photo: Startup Weekend Hackathon. Nov.2014

Slide 14

Slide 14 text

Photo: Startup Weekend Hackathon. Nov.2014 The variable name can be changed. Variable names appear in the heading of the data view. Variable names should be clear, concise and cannot contain spaces. VARIABLE NAME

Slide 15

Slide 15 text

Photo: Startup Weekend Hackathon. Nov.2014 Not all variables are created equal. Numeric: Numeric variables as you might expect, have data values that are recognized as numbers. Use this variable for both integer and decimal number (dot used to indicate decimals, not comma). String: also called alphanumeric variables, have values that are treated as text VARIABLE TYPE

Slide 16

Slide 16 text

Photo: Startup Weekend Hackathon. Nov.2014 VARIABLES IN THE MUSIC-1 DATASET 8

Slide 17

Slide 17 text

Photo: Startup Weekend Hackathon. Nov.2014 You can assign descriptive variable labels up to 256 characters. Variable labels can contain spaces and reserved characters that are not allowed in variable names. Do yourself a favor: everytime you create a dataset, make sure to describe what each variable is/means using the Label field. VARIABLES LABEL

Slide 18

Slide 18 text

Photo: Startup Weekend Hackathon. Nov.2014 Scale: A variable can be treated as scale when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years, and income in thousands of Dollars. VARIABLES MEASURE

Slide 19

Slide 19 text

Photo: Startup Weekend Hackathon. Nov.2014 Ordinal: A variable can be treated as ordinal when its values represent categories with some intrinsic ranking. For example, levels of service satisfaction from highly dissatisfied to highly satisfied. Examples of ordinal variables include a degree of satisfaction among the consumers, school grades (A, B, C, D, E, F), etc. VARIABLES MEASURE

Slide 20

Slide 20 text

Photo: Startup Weekend Hackathon. Nov.2014 Nominal: A variable can be treated as nominal when its values represent categories with no intrinsic ranking. For example the department of the company in which an employee works. Examples of nominal variables include region, zip code, or gender of individual or religious affiliation. VARIABLES MEASURE

Slide 21

Slide 21 text

Photo: Startup Weekend Hackathon. Nov.2014 VARIABLES MEASURE: RULE OF THUMB Can the values of a variable be ranked? NO YES Do the values of a variable share all the same unit of measurement? NO YES NOMINAL ORDINAL SCALE

Slide 22

Slide 22 text

Photo: Startup Weekend Hackathon. Nov.2014 Are the values of a variable independent, meaning that they cannot be ranked? If yes, it’s Nominal. Example: First name, Nationality, University name. Do the values of a variable share all the same unit of measurement, and they can be ordered? If yes, it’s a Scale. Examples include Height (cm or ft, in), Age (in years), speed (in km/h), weight (in kg, pounds)... Can the values of a variable be ordered according to some meaningful principle and values do not share a common unit of measurement? If yes, it’s ordinal. Examples include school grades (A, B, C, D, E, F), experience (beginner, intermediate, expert), etc. VARIABLES MEASURE: RULE OF THUMB

Slide 23

Slide 23 text

Photo: Startup Weekend Hackathon. Nov.2014 ASSIGNMENT 2 8 Import the Dataset Music-1.xlsx into SPSS 1. Go to Variable View 2. Rename the Variable “Title” to “Song_title” 3. Write a label that describes the meaning of the variable Tempo (the variable Tempo represents the speed of the song in BPM, Beats Per Minute) 4. Change the Measure of the variables Popularity and Release_date from Scale to Ordinal Take a screenshot of Variable View and upload it on Canvas.

Slide 24

Slide 24 text

Photo: Startup Weekend Hackathon. Nov.2014 8

Slide 25

Slide 25 text

Photo: Startup Weekend Hackathon. Nov.2014 TO CONCLUDE… 8 1. Save your project. 2. SPSS project files have the .sav extension. Your saved project includes the data (which means, no need to re-import the dataset next time)

Slide 26

Slide 26 text

THANK YOU Alberto Lusoli [email protected] Office hour: Thursday, 12.30pm - 1.20pm (please book an appointment in advance via email).