DI Lecture 7 Essentials of SPSS Program.pptx

sireenshilbayeh1 31 views 52 slides Aug 31, 2025
Slide 1
Slide 1 of 52
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52

About This Presentation

spss essentials


Slide Content

Research questions about one group: Essentials of SPSS Program Dr. Nagham Fehmi

Types of statistics Descriptive- summarize or describe our observations Inferential- use observations to allow us to make predictions (inferences) about a situation that has not yet occurred

Descriptive or Inferential? I cycle about 50 km per week on average. We can expect a lot of rain this time of year.

Population vs Sample A population refers to all the cases to which a researcher wants his estimates to apply to: White mice, lightbulb life, students A sample is used because it is normally impossible to study all the members of a population Descriptive stats simply summarize a sample Inferential stats generalize from a sample to the wider population

Variables Samples are made up of individuals, all individuals have characteristics. Members of a sample will differ on certain characteristics. Hence, we call this variation amongst individuals variable characteristics or variables for short.

Types of Variables What are variables you would consider in buying a second hand bike? Brand (Trek, Raleigh) Type (road, mountain, racer) Components (Shimano, no name) Age Condition (Excellent, good, poor) Price Frame size Number of gears

SPSS at a glance Originally it is an acronym of Statistical Package for the Social Science but now it stands for Statistical Product and Service Solutions One of the most popular statistical packages which can perform highly complex data manipulation and analysis with simple instructions

Scale of Measurement Nominal (categorical) e.g. race, colour , sex, job status, etc. Ordinal (categorical) e.g. the effect of a drug could be none, mild and severe, job importance (1-5, 1 being not important and 5 very important), etc. Interval (continuous, covariates, scale, metric) e.g. temperature (in Celsius), weight (in stones or Kg), height (in inches or cm), etc.

Kinds of data 1. Interval data These are data taken from an independent scale with units. Examples include height, weight and temperature. 2. Ordinal data These are data collected from ranking variables on a given scale. For example, you may ask respondents to rank some variable based on their perceived level of importance of the variables using Likert type scale such as 1, 2, 3, 4 and 5. 3. Nominal data Merely statements of qualitative category of membership. Examples include gender (male or female), race (black or white), nationality (British, American, African, etc.). It should be appreciated that both Interval and Ordinal data relate to quantitative variables while Nominal data refers to qualitative variables.

You know the basics of using a computer such as: 1. How to start applications 2. How to use your mouse 3. How to move and close windows. 4. How to save and open a file.

To load SPSS Click on the (SPSS for Windows) option to load and run SPSS. This will take some time so be patient!

The Four Windows: Data editor extension . sav Output viewer extension . spv Syntax editor extension . sps Script window extension . sbs

Data editors has two main views: When you load and run the SPSS package it opens up a menu bar and two views. These are the Data View (currently visible) and the Variable View . Menu Bar: This provides a selection of options (File Edit View Data.....)which allow you for example to open files, edit data, generate graphs, create tables and perform statistical analyses. Selecting from this menu bar will, like in other windows packages, provide further pull-down menus and dialogue boxes. Data View: This sheet contains your data (once you have entered it!), each column representing a variable for which data are available and each row representing that data for an individual or case. At present this sheet should be blank. As this sheet is currently selected its name on the tab at the bottom is in bold. Variable View: At present this sheet is not visible as the variable view sheet is not active. Consequently the name is not in bold. Don’t bother to look click on the tab and look at this sheet yet, we will do that later.

The Data View window is simply a grid with rows and columns. The rows represent subjects (cases or observations) and columns represent variables whose names should appear at the top of the columns. In the grid, the intersection between a row and a column is known as a cell. A cell will therefore contain the score of a particular subject (or case) on one particular variable. This window displays the contents of data file. You create new data files or modify existing ones in this window. This window opens automatically when you start an SPSS session.

Variable view window This sheet contains information about the data set that is stored with the dataset Name The first character of the variable name must be alphabetic Variable names must be unique, and have to be less than 64 characters. Spaces are NOT allowed.

Variable names Always give meaningful names to all your variables. If you do not, SPSS will name the variables for you, calling the first variable var00001, the second var00002 and so on. There are six specific rules that you should follow when selecting variable names. A variable name: 1. must not exceed 32 characters. (A character is simply a letter, digit or symbol). 2. must begin with a letter. 3. could have a mixture of letters, digits and any of the following symbol: @, #, _, $. 4. must not end with a full stop. 5. must not contain any of the following: a blank, !, ?, *. 6. must not be one of the keywords used in SPSS (e.g. AND, NOT, EQ, BY, and ALL)

Type Click on the ‘type’ box. The two basic types of variables that you will use are numeric and string. This column enables you to specify the type of variable.

Width Width allows you to determine the number of characters SPSS will allow to be entered for the variable

Decimals Number of decimals It has to be less than or equal to 16

Label You can specify the details of the variable You can write characters with spaces up to 256 characters

Values This is used and to suggest which numbers represent which categories when the variable represents a category

Defining the value labels Click the cell in the values column as shown below For the value, and the label, you can put up to 60 characters. After defining the values click add and then click OK

Sample Questionnaire 1. What is your gender? Please tick 1: Male Female 2. What is your date of birth? …………………… 3. What is the total number of years you completed in an educational establishment? ……. 4. Which employment category do you belong to? Please select one: Manager Clerical Custodial 5. What is your current salary? ………………. 6. What was your beginning salary …………..

Click the tap for Variable View window and code each question using the information shown on the table below: Question Name Type Label Value and Label Measure 1 gender String Respondent’s sex m=male, f=Female Nominal 2 bdate Date Date of birth Scale 3 educ Numeric Educational level Scale 4 jobcat Numeric Employment category 1=Clerical, 2=Custodial, 3=Manager Nominal 5 salary Dollar Current salary Scale 6 salbegin Dollar Beginning salary Scale

Go to the Data View and type in the data shown on the table below :

Practice 1 How would you put the following information into SPSS? Value = 1 represents Male and Value = 2 represents Female

Practice 1 (solution sample)

Saving the data To save the data file you created simply click ‘file’ and click ‘save as.’ You can save the file in different forms by clicking “Save as type.”

Sorting the data Click ‘Data’ and then click Sort Cases

Sorting the data Double Click ‘Name of the students.’ Then click ok.

Practice 2 How would you sort the data by the ‘Height’ of students in descending order? Answer Click data, sort cases, double click ‘height of students,’ click ‘descending,’ and finally click ok.

Transforming data Click ‘Transform’ and then click ‘Compute Variable…’

Transforming data Example: Adding a new variable named ‘ lnheight ’ which is the natural log of height Type in lnheight in the ‘Target Variable’ box. Then type in ‘ln(height)’ in the ‘Numeric Expression’ box. Click OK

Transforming data A new variable ‘ lnheight ’ is added to the table

Practice 3 Create a new variable named “ sqrtheight ” which is the square root of height. Answer

The basic analysis

The menu bar options are used as follows: File is used to access any files whether you want to Open an existing SPSS file or read data in from another application such as Excel of dBase, or start a New file. It is also the menu option you choose to Save files. Edit can be used to alter data or text in the Data View or the Variable View. View can be used to alter the way your screen looks. Please leave this on the default settings. Data is used to define variables and make changes to the data file you are using. Transform is used to make changes to selected variable(s) in the data file you are using. This can include recode( ing ) existing variables and compute( ing ) new variables. Analyze is used to undertake a variety of analyses such as producing Reports, Calculating Descriptive Statistics such as Frequencies and Crosstabs ( crosstabulations ) and associated summary statistics, as well as various statistical procedures such as Regression and Correlation. Graphs is used to create a variety of graphs and charts such as Bar, Line and Pie charts. Utilities is for more general housekeeping such as changing display options and fonts, displaying information on variables. Window operates in the same way as other Windows packages. Help is a context sensitive help feature which operates the same way as other Windows packages.

Opening the sample data Open ‘Employee data.sav ’ from the SPSS Go to “File,” “Open,” and Click Data

Opening the sample data Go to Program Files,” “ SPSSInc ,” “SPSS16,” and “Samples” folder. Open “Employee Data.sav ” file

Frequencies Click ‘Analyze,’ ‘Descriptive statistics,’ then click ‘Frequencies’

Frequencies Click gender and put it into the variable box. Click ‘Charts.’ Then click ‘Bar charts’ and click ‘Continue.’

Frequencies Finally Click OK in the Frequencies box. Dialogue boxes You use dialogue boxes to select variables and options for statistics and charts. You select variables for analysis from the source list. And you use the arrow button to move the variables into the target list. Dialogue box buttons with an ellipsis (...) open subdialogue boxes for optional selections. There are five standard buttons on most dialogue boxes (OK, PASTE, RESET, CANCEL, and HELP).

Frequencies

Using the Syntax editor Click ‘Analyze,’ ‘Descriptive statistics,’ then click ‘Frequencies.’ Put ‘Gender’ in the Variable(s) box. Then click ‘Charts,’ ‘Bar charts,’ and click ‘Continue.’ Click ‘Paste.’

Using the syntax editor Highlight the commands in the Syntax editor and then click the run icon. You can do the same thing by right clicking the highlighted area and then by clicking ‘Run Current’

Practice 4 Do a frequency analysis on the variable “minority” Create pie charts for it Do the same analysis using the syntax editor

Answer

Descriptives Click ‘Analyze,’ ‘Descriptive statistics,’ then click ‘ Descriptives …’ Click ‘Educational level’ and ‘Beginning Salary,’ and put it into the variable box. Click Options

Descriptives The options allows you to analyze other descriptive statistics besides the mean and Std. Click ‘variance’ and ‘kurtosis’ Finally click ‘Continue’

Descriptives Finally Click OK in the Descriptive box. You will be able to see the result of the analysis.
Tags