introduction to spss opening the program type in data open an existing data set for now, click...

24
Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Upload: audra-jewel-hodge

Post on 17-Dec-2015

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Introduction to SPSS

• Opening the program

Type in data

Open an existing data set

For now, click “Cancel”

Page 2: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Data vs. Variable View

• Opening a data file: Cars.sav*

Variable View

Data View

Data from an SPSS sample data file called “cars”* Save a copy on your USB drive

Use tabs at bottom to change views

Page 3: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Exploring SPSS, cont’d

• Exploring Menus and Toolbars

Toolbar variables icon

Page 4: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Data ViewRight click on variable name to bring up a menu

Value labels (vs. numeric data) can be toggled on and off from the View menu

Page 5: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Variable View

Variable name Data type Number of digits or characters Number of decimal places Descriptive variable and value labels User-defined missing values Column width Measurement level

Page 6: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Values and Value Labels

Page 7: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Steps in Creating a Data File in SPSS

1. Make a determination as to how each variable in your research is to be measured and calculated (for example, is the “total attitude towards computing” to be the sum of the 20 items on the Attitudes toward Computing scale? Perhaps there were some items that you have determined through inspection aren’t useful, or perhaps you have some items that have to be “reverse coded” or for which there are many missing answers.

a. Assign an Id number to each respondent. i. Protecting respondent privacy

b. Name each variable. For example, the items on the Attitudes toward Computing Scale could be ATC1, ATC2,,,,,….ATC20.

i. This name is a mnemonic for a longer variable name which you can assign. It should generally start with a letter and, to be compatible with older versions of SPSS, only 8 characters long, although current version can be 64 characters in most cases

Page 8: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Creating a Data File, 2C. Specify the level of measurement (categorical or

numerical, and if categorical, nominal or ordinal)D. Assign category values to the categories of each

variable.Numerical values can be assigned the values they were given by the subjectCategorical values (strongly agree, agree, neutral, disagree, strongly

disagree; male/female) should be assigned numerical values such as 5,4, 3, 2, 1, where 5 equal “strongly agree” and 1 equals “strongly disagree;” male = 1 and female = 2, etc.

E. Decide how you will deal with missing values. Do you want to include a response alternative of “don’t know” or

“no answer” in the questionnaire or measure and then treat that choice of answer as “missing” in the data analysis?

Page 9: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Sample QuestionnaireBelow is how a fictitious respondent filled out some sample items from our study at St. Barnabas

Senior Services Center.

Respondent ID: 0011. Are you _____XXX male ______female2. Are you (please mark [XXX] one.)_____African American/Black_XXX Chinese/Chinese American_____Korean/Korean American_____Mexican/Mexican American_____White, non-Hispanic/Caucasian(please specify ethnicity, for example, Irish, Swedish, etc.)_____Other, please specify _________________________3. You are interested in knowing what your neighbors are like.XXX strongly agree agree neither agree nor disagree disagree strongly disagree4. It’s hard to become friends with your neighbors.strongly agree agree neither agree nor disagree XXX disagree strongly disagree

How many of your neighbors do you know well enough to ask them to do some of the following things? Write the number of neighbors in the blank.

5. Keep watch on your house or apartment? 2_____6. Ask for a ride? 3_____

Page 10: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Naming and defining Variables for SPSS: Decisions You Will MakeRespondent ID: 0011. Are you _____XXX male ______female

Name: IDCategorical-Nominal

2. Are you (please mark [XXX] one.)_____African American/Black_XXX Chinese/Chinese American_____Korean/Korean American_____Mexican/Mexican American_____White, non-Hispanic/Caucasian_____Other

Name: EthnicCategorical-NominalNo Answer = 9 Multiple Answer = 8 African American/Black = 1 Chinese/Chinese American = 2 Korean/Korean American = 3

Mexican/Mexican American = 4 White, non-Hispanic/Caucasian = 5 Other = 6

Page 11: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Naming and defining Variables for SPSS, cont’dFour items measuring feeling of belonging to the neighborhood:3. You are interested in knowing what your neighbors are like.XXX strongly agree agree neither agree nor disagree disagree

strongly disagree

Name=NBR1Scale-OrdinalNo Answer= 9 Multiple Answer = 8 Strongly Agree = 5 Agree = 4 Neither Agree nor Disagree = 3 Disagree = 2 Strongly Disagree = 1

4. It’s easy to become friends with your neighbors.XXX strongly agree agree neither agree nor disagree disagree

strongly disagreeName=NBR2Scale-OrdinalNo Answer = 9 Multiple Answer = 8 Strongly Agree = 5 Agree = 4 Neither Agree nor Disagree = 3 Disagree = 2 Strongly Disagree = 1

Page 12: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Sample Questionnaire, 3How many of your neighbors do you know well enough to ask them to do some of the

following things? Write the number of neighbors in the blank.5. Keep watch on your house or apartment? 2_____

Name: NBRHLP1Scale=ScaleNo Answer = 99

6. Ask for a ride? 3_____

Name: NBRHLP2Scale-ScaleNo Answer = 99

Page 13: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Using SPSS to define variables: The Steps You Will be Takinhg

In SPSS, go to File/New Data, then click on the Variable View tab; we’re going to

1. Name each variable2. Specify variable type, column width and decimals

a. Variable type: string vs. numeric (or a variation of numeric)b. Width: how many digits you can enter for the variable, up to 8c. Decimals: set at zero if data contain no decimals

Page 14: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Assign Labels, Values to Variables 3. Assign labels to each variable

a. Variable labels may contain spaces or other symbols

4. Create values and value labels for each category of a variablea. Assign values for “don’t know” or “no answer” or “multiple answer”

responsesb. Assign values for scale alternatives such as “strongly agree” and

“strongly disagree,” “male” vs. “female,” etcc. No need to assign values if the scale is strictly numeric (e.g. age,

number of times something occurs, etc.) except missing values

Page 15: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Tell SPSS about Missing Values5. Tell SPSS which values should be treated as missing and thus left

out of computations. Enter the 9s, 99, 98, etcs. as ‘discrete” missing values

6. Format the columns for each variable7. Identify the level of measurement of each

Page 16: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

An example for the ID variableIn Variable View, type the name of the first variable, ID, into the first row under “Name”. Note that default values are provided for the other variable attributes

The things you need to change are The number of decimals to 0 The label to the name “Respondent’s ID” Measure should be changed from Scale to Nominal

Page 17: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

An example for the Ethnic variable

Now type in the name “ethnic” for your second variable, hit tab and the default values will be entered

You will need to change Decimals from 2 to 0 Provide a label for the variable (for example

“Respondent Ethnicity”) Measure from scale to nominal

Page 18: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Adding value labels for “Ethnic”

Provide Value Labels for the categories of the variable using the scheme developed earlier:

African American/Black = 1 Chinese/Chinese American = 2 Korean/Korean American = 3 Mexican/Mexican American = 4 White, non-Hispanic/Caucasian = 5 Other = 6 Multiple Answer = 8 No Answer =9

Page 19: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Define missing data for “Ethnic”

Recall that you decided to treat “no answer” and “multiple answer” as missing data, so enter their codes in the missing values dialog box

Now would be a good time to start saving your file. Save it as practice1.sav

Page 20: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Enter the rest of your variables Variables 3 and 4 have the

same category labels and values and the same missing values, so you can use copy and paste to simplify your work

Just right click on the box on the value labels you want to copy from and select “copy”, then right click on the box of the value labels you want to copy to and select “paste”

Do the same with the missing values category

Page 21: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

What the results of variable definitions should look like

Page 22: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Confirming Variable Definitions8. When you have entered all of your variables, click the Data

View tab to make sure all of your newly defined variables appear as column headings. Click on the variable icon on the toolbar to bring up the variables properties. Make corrections as needed.

Page 23: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Entering Your DataLet’s pretend this is the raw information from your coding sheet. In

SPSS Data View, enter the data for these five respondents.You can turn value labels on or off depending on whether it helps

you to enter data.

Page 24: Introduction to SPSS Opening the program Type in data Open an existing data set For now, click “Cancel”

Checking Your Data InputCheck your data. Turn on value labels. It should look like this:

Compare the entries on the screen against the code sheet or raw data (surveys, measures) or

Use the Analyze/Reports/Case Summaries feature to create a case-by-case listing of the data you input and compare against the code sheets or raw data

Finally, save your data as an SPSS data file (Practice2.sav)