0% found this document useful (0 votes)
46 views41 pages

Data Entry & Descriptive Stats in SPSS

The document provides instructions for students to complete a lab assignment involving entering data into SPSS and performing descriptive statistics. It includes sample data for 20 subjects with various demographic and medical characteristics. The objectives are to construct a data file, modify the data, and perform descriptive statistics on categorical and continuous variables, presenting the results both graphically and non-graphically.

Uploaded by

9rw9yrh6qy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views41 pages

Data Entry & Descriptive Stats in SPSS

The document provides instructions for students to complete a lab assignment involving entering data into SPSS and performing descriptive statistics. It includes sample data for 20 subjects with various demographic and medical characteristics. The objectives are to construct a data file, modify the data, and perform descriptive statistics on categorical and continuous variables, presenting the results both graphically and non-graphically.

Uploaded by

9rw9yrh6qy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

1

RS2050 Research Methods and Statistics

Lab 5:
DATA ENTRY AND DESCRIPTIVE STATISTICS

Objectives

Upon completion of this tutorial, you should be able to:

1. Construct a data file and input data.


2. Modify the data file.
3. Be able to perform appropriate descriptive statistics for the variables for both
categorical and continuous data.
4. Present the results in both non-graphical and graphical forms.

Data Set

 Section 1 and 2: Your first task is to set up a data file in SPSS based on the data
sheets provided (p. 2-6).
 Section 3-6: Download the dataset Lab 5 from the Blackboard.
2

DATA SET

Subject # _____1_____ Subject # _____2____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African___ Asian __ Caucasian _x_ African___

Age (y) _72_ Gender (M/F) _M_ Age (y) _74_ Gender (M/F) _M_

Height (cm) _180_ Weight (kg) _84.3__ Height (cm) _181_ Weight (kg) _71_

Stroke onset (years) _4_ Stroke onset (years) _7_

Paretic side (L/R) _L_ Paretic side (L/R) _L_

VO2peak (ml/min) _1755_ Berg _54_ VO2peak (ml/min) _1366_ Berg _44_

Modified Ashworth (foot) _0_ Modified Ashworth (foot) _1.5_

FIM walking score _7_ FIM walking score __6_

Geriatric Depression Scale _11_ Geriatric Depression Scale _2_

Subject # ____3_____ Subject # _____4_____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African___ Asian __ Caucasian ___ African _x_

Age (y) _70_ Gender (M/F) _M__ Age (y) __69_ Gender (M/F) _M__

Height (cm) _181__ Weight (kg) _98.6__ Height (cm) __180_ Weight (kg) _96.2__

Stroke onset (years) _7__ Stroke onset (years) _5__

Paretic side (L/R) _R__ Paretic side (L/R) _L__

VO2peak (ml/min) _1972__ Berg _43__ VO2peak (ml/min) _1900__ Berg _45__

Modified Ashworth (foot) _1.0__ Modified Ashworth (foot) _0_

FIM walking score _6__ FIM walking score _6_

Geriatric Depression Scale _1__ Geriatric Depression Scale _3__


3

Subject # ____5_____ Subject # ____8______

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African ___ Asian __ Caucasian _x_ African ___

Age (y) _51_ Gender (M/F) _M__ Age (y) _58_ Gender (M/F) _M_

Height (cm) __186_ Weight (kg) __96_ Height (cm) _175_ Weight (kg) _80.9_

Stroke onset (years) __4 Stroke onset (years) _1_

Paretic side (L/R) _R_ Paretic side (L/R) _R_

VO2peak (ml/min) _1875 Berg _34_ VO2peak (ml/min) _1611_ Berg __40

Modified Ashworth (foot) _1.5_ Modified Ashworth (foot) _0_

FIM walking score __5_ FIM walking score __4_

Geriatric Depression Scale _7__ Geriatric Depression Scale _12__

Subject # _____10____ Subject # _____11____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African ___ Asian _x_ Caucasian ___ African ___

Age (y) _50__ Gender (M/F) _M_ Age (y) _71__ Gender (M/F) _M__

Height (cm) _171_ Weight (kg) __128.8_ Height (cm) _170__ Weight (kg) _71.1__

Stroke onset (years) _3_ Stroke onset (years) _5_

Paretic side (L/R) _L_ Paretic side (L/R) _L__

VO2peak (ml/min) _2453_ Berg _26_ VO2peak (ml/min) _1455_ Berg _37__

Modified Ashworth (foot) _1.0_ Modified Ashworth (foot) _0_

FIM walking score __3_ FIM walking score _4__

Geriatric Depression Scale _19_ Geriatric Depression Scale _15__


4

Subject # ____14____ Subject # _____15___

What is your ethnic origin? What is your ethnic origin?


Asian _x_ Caucasian ___ African ___ Asian _x_ Caucasian ___ African ___

Age (y) _69_ Gender (M/F) _M_ Age (y) _74_ Gender (M/F) _M_

Height (cm) _173_ Weight (kg) _66.5__ Height (cm) _183__ Weight (kg) _84__

Stroke onset (years) _3_ Stroke onset (years) _6_

Paretic side (L/R) _R_ Paretic side (L/R) _R_

VO2peak (ml/min) _1322_ Berg _21_ VO2peak (ml/min) _1544_ Berg __34_

Modified Ashworth (foot) _3.0_ Modified Ashworth (foot) _2.0_

FIM walking score __3_ FIM walking score __4__

Geriatric Depression Scale __4_ Geriatric Depression Scale _9__

Subject # _____19_____ Subject # _____20____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African ___ Asian _x_ Caucasian ___ African ___

Age (y) _72_ Gender (M/F) _M_ Age (y) _57_ Gender (M/F) _M_

Height (cm) _171_ Weight (kg) _81.3__ Height (cm) _176_ Weight (kg) _94.5_

Stroke onset (years) _3_ Stroke onset (years) _3_

Paretic side (L/R) _L_ Paretic side (L/R) _L_

VO2peak (ml/min) _1765_ Berg _16__ VO2peak (ml/min) _1789_ Berg _14__

Modified Ashworth (foot) _1.0_ Modified Ashworth (foot) _1.5_

FIM walking score _2_ FIM walking score _2__

Geriatric Depression Scale _8__ Geriatric Depression Scale _12__


5

Subject # ____6_____ Subject # ____7_____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian _x_ African ___ Asian _x_ Caucasian ___ African ___

Age (y) __87_ Gender (M/F) _F__ Age (y) __70_ Gender (M/F) _F__

Height (cm) __173__ Weight (kg) _73.5__ Height (cm) __168_ Weight (kg) _72.4_

Stroke onset (years) _1_ Stroke onset (years) _4_

Paretic side (L/R) _R_ Paretic side (L/R) _R_

VO2peak (ml/min) _1334_ Berg _20_ VO2peak (ml/min) _1465_ Berg _36_

Modified Ashworth (foot) _0_ Modified Ashworth (foot) __0_

FIM walking score __3_ FIM walking score __4_

Geriatric Depression Scale _17__ Geriatric Depression Scale __11__

Subject # _____9_____ Subject # ____12_____

What is your ethnic origin? What is your ethnic origin?


Asian _x_ Caucasian ___ African ___ Asian __ Caucasian _x__ African ___

Age (y) _73_ Gender (M/F) _F_ Age (y) _76_ Gender (M/F) _F_

Height (cm) _170__ Weight (kg) _65_ Height (cm) _187__ Weight (kg) _99.9__

Stroke onset (years) _3_ Stroke onset (years) _10_

Paretic side (L/R) _L_ Paretic side (L/R) _L_

VO2peak (ml/min) _1388_ Berg _42_ VO2peak (ml/min) _1887_ Berg _10_

Modified Ashworth (foot) _2.0_ Modified Ashworth (foot) _0_

FIM walking score _5_ FIM walking score _1_

Geriatric Depression Scale _2__ Geriatric Depression Scale _9_


6

Subject # _____13____ Subject # ____16_____

What is your ethnic origin? What is your ethnic origin?


Asian __ Caucasian ___ African __x_ Asian __ Caucasian _x__ African ___

Age (y) __69_ Gender (M/F) _F__ Age (y) __60__ Gender (M/F) __F__

Height (cm) __173_ Weight (kg) _66.5__ Height (cm) _183__ Weight (kg) _78.2_

Stroke onset (years) _3_ Stroke onset (years) _2_

Paretic side (L/R) _R_ Paretic side (L/R) __R_

VO2peak (ml/min) _1409_ Berg _49_ VO2peak (ml/min) __1467_ Berg _55_

Modified Ashworth (foot) _2.0_ Modified Ashworth (foot) _1.0_

FIM walking score _6_ FIM walking score __7_

Geriatric Depression Scale _4__ Geriatric Depression Scale __7__

Subject # _____17_____ Subject # _____18_____

What is your ethnic origin? What is your ethnic origin?


Asian _x_ Caucasian ___ African ___ Asian __ Caucasian _x__ African ___

Age (y) __52_ Gender (M/F) _F__ Age (y) _66_ Gender (M/F) _F_

Height (cm) _186__ Weight (kg) _115.9_ Height (cm) _177__ Weight (kg) _95.8_

Stroke onset (years) _4_ Stroke onset (years) _9__

Paretic side (L/R) _L_ Paretic side (L/R) _L_

VO2peak (ml/min) _2245_ Berg _40_ VO2peak (ml/min) _1876_ Berg _34_

Modified Ashworth (foot) _1.5_ Modified Ashworth (foot) _1.0_

FIM walking score _5__ FIM walking score _4_

Geriatric Depression Scale _4_ Geriatric Depression Scale _4_


7

SECTION 1: CREATING A DATA FILE

STEP 1: DEFINING VARIABLE NAMES

 Open SPSS by double clicking on the SPSS icon on the desktop.


 Select “Type in data” under “What would you like to do?” box.
 There are 2 data spreadsheets. One is called “Variable View” and another is called
“Data View”.
 Click on the “Variable View” on the bottom left corner.
 Set up your data base so that the variables are in the same order as they are on the
data collection sheet.
 Click in the empty box under “Name” and enter a variable name for the first variable
(no space) (e.g. subject).

STEP 2: DEFINING VARIABLE LABELS

 The variable label is a longer description of what a variable represents.


 Variable labels can include spaces.
 Click in the empty box under “Label” and type in a longer description of the variable
(e.g. subject code).

 Inclusion of the units of measurements for each continuous variable is recommended


(e.g. subject c
8

STEP 3: DEFINING LEVEL OF MEASUREMENT

 SPSS works with numbers, so the values for each variable are usually in the form of
numbers.
 It is important to know the level of measurement for each variable (e.g. categorical Vs
continuous).
 For categorical variables, assign a number to represent a specific category (e.g. 1 for
male, 2 for female). The number does not represent the actual quantity.
 For continuous variables, the values are the actual numbers that you get or measure
(e.g. 54kg for weight)

 Click the box under “Measures”.


 Select either “Nominal”, “Ordinal”, or “Scale”.

STEP 4: DEFINING VALUE LABELS (for categorical variables only)

 Click the empty box under “Values”.


 Type in the number you will use to represent the value of a particular group in the
“Value” box (e.g. 1).
 Type in the label to describe what the value represents (e.g. Asian).

 Click “Add”.
9

 Repeat the procedure until all groups are labeled, then click “OK”.

 The information will appear on the “Variable View” screen.

STEP 5: SPECIFY THE DECIMAL PLACES

 Click the box under “Decimals”.


 Select the desired decimal place for each variable.
10

STEP 6: DATA ENTRY

 Click on “Data View” in the bottom left corner of the screen.


 Enter data for your 20 subjects.
 Each row represents one subject/case (e.g. subject 1).
 Each column represents one variable (e.g. Berg balance score).
 SAVE your data frequently.
11

SECTION 2: MODIFYING A DATA FILE

 ALL of the following procedures are done on the “Data View” screen.

1. DELETING A CASE

 Single click on the far left number associated with the case you want to delete.
 The entire row will be highlighted.
 Click the right mouse button once and select “Clear”.

2. INSERTING A CASE

 Single click on the far left number associated with the place you want to add a case.
 The entire row will be highlighted.
 Click the right mouse button once and select “Insert Cases”.
12

3. DELETING A VARIABLE

 Single click on the variable name of the variable you want to delete.
 The entire column will be highlighted.
 Click the right mouse button once and select “Clear”.

4. INSERTING A VARIABLE

 Single click on the variable name where you want to insert a new variable.
 The entire column will be highlighted.
 Click the right mouse button once and select “Insert Variables”.

 Go to the “Variable View” screen to define variable name, variable label, values and
value labels if appropriate.
13

5. SORTING THE DATA

EXAMPLE: You would like to have all male subjects listed before female subjects (Sort
the file based on “Gender”).

 Click on “Data” from the main menu.


 Select “Sort cases…”.

 Click on the variable “Gender” to highlight it.


 Click on the right arrow button to transfer this variable into the box “sort by”.

 Select “Ascending” under “Sort Order” (because male has a code of 1 and female
has a code of 2).
 Click “OK”.
 Go back to your data file to view the change.
14

6. SPLITTING THE DATA

EXAMPLE: You want the analysis to be done for male and female subjects separately
(Splitting the file according to “Gender”).

 Click on “Data” from the main menu.


 Select “Split File…”.

 Select “Organize output by groups”.


 Click on the categorical variable that you want to split (e.g. gender).

 Click on the arrow to transfer the variable into the box.


 Click “OK”.
15

NOTE: If you want to analyze the whole data set again after splitting the file, you must:
 Click on “Data” from the main menu.
 Select “Split File…”.
 Select “Analyze all cases, do not create groups” and then click “OK”.
16

7. SELECTING CASES

EXAMPLE: You only want to do analysis on male subjects (Selecting all male subjects).

 Click on “Data” from the main menu.


 Select “Select cases…”.

 Click on the circle next to “If condition is satisfied”.


 Click on the box with the word “If” on it.
17

 Click on the variable that represents “Gender” to highlight it.


 Click on the arrow to transfer it into the box on the right.

 Click on the symbols and numbers below the box to construct a logical statement to
select only the subjects that you want to analyze (e.g. gender =1).
18

 Click “Continue”.
 Click “OK”.
 Note that there will be a diagonal line next to the case that was not selected (e.g. all
female subjects).

NOTE: To return to analyzing all subjects after selecting cases, you must:
 Click “Data” from the main menu.
 Select “Select cases”.
 Select “All cases”.

 Click “OK”.
19

8. COMPUTING A NEW VARIABLE

EXAMPLE:

 You would like to compute the body mass index from 2 existing variables in your
dataset (height and weight).

Body mass index (BMI) = weight (kg) / [height (m)]2

 Click “Transform” from the main menu.


 Select “Compute”.

 In the “Target Variable” box, type in a new variable name (i.e. BMI).

 Click the box underneath this new variable called “Type and Label”.
20

 Add a variable label (e.g. BMI in kg/m2).

 Click “Continue”.
 Transfer the variable for weight from the list on the left to the top right box titled
“Numeric Expression”.

 Use the symbols under this box and the variable names on the left, create the
following formula for calculating BMI.

Weight/(height/100)**2
21

NOTE:
 A factor of 100: converting the height from cm to m.
 **2 represents “to the power of 2”.

 Click “OK”.
 There should be a new variable called “BMI” at the end of the data set.
22

SECTION 3: CATEGORICAL VARIABLES (TABLE FORM)

Discussion:
 For nominal variables, what are the appropriate statistics to measure:
o Central tendency?
o Variability?

EXAMPLE 1:

Objective: To present the descriptive statistics for “Gender” in table form.

Procedures:
 Click “Analyze” from the main menu.
 Select “Descriptive Statistics”.
 Select “Frequencies…”.
 Transfer the categorical variable (e.g. Gender) into the box “Variable(s)”.

 Click “Continue”.
 Click “OK”.

Output:

gender

Cumulative
Frequency Percent Valid Percent Percent
Valid Male 12 60.0 60.0 60.0
Female 8 40.0 40.0 100.0
Total 20 100.0 100.0
Mode = male
23

EXERCISE 1:

Present the descriptives for “Side of paresis” using a table format.

Frequency Percent
Side of paresis Left
Right

Mode =

EXERCISE 2:

Present the descriptives for “Ethnicity” using a table format.

Frequency Percent
Ethnicity Asian
Caucasian
African

Mode =
24

Discussion:
 For ordinal variables, what are the appropriate statistics to measure:
o Central tendency?
o Variability?

EXAMPLE 2:

Objective: To present the descriptives of the variable “Modified Ashworth Scale of


Spasticity” in table form.

Procedures:
 Click “Analyze” from the main menu and select “Descriptive Statistics”.
 Select “Frequencies…”.
 Transfer the categorical variable (e.g. Modified Ashworth Scale of Spasticity)
into the box “Variable(s)”.
 Click “Statistics…” on the right.
 Under “Central Tendency”, select “Mode” and “Median”.

 Under “Percentile Values”, select “Quartiles”.


 Under “Dispersion”, select “Range”.
25

 Click “Continue”.
 Click “OK”.

Output:

Statistics

Modified Ashworth Scale of Spasticity


N Valid 20
Missing 0
Median 1.000
Mode .0
Range 3.0
Percentiles 25 .000
50 1.000
75 1.500

Modified Ashworth Scale of Spasticity

Cumulative
Frequency Percent Valid Percent Percent
Valid .0 7 35.0 35.0 35.0
1.0 5 25.0 25.0 60.0
1.5 4 20.0 20.0 80.0
2.0 3 15.0 15.0 95.0
3.0 1 5.0 5.0 100.0
Total 20 100.0 100.0

 What is the interquartile range (IQR)?


26

EXERCISE 3:

Perform descriptive analysis for “FIM walking score” in table form.

FIM walking score


Mode
Median
Range
IQR

Score Frequency Percent


1
2
3
4
5
6
7
27

SECTION 4: CATEGORICAL VARIABLES (GRAPHICAL FORM)

Discussion:
 For nominal variables, what are the appropriate graphical methods to display the
results of the descriptive analysis?

EXAMPLE 1 (BAR CHARTS AND PIE CHARTS):

Objective: To display the descriptives for “Gender” using a bar or pie chart.

Procedures:
 Click “Analyze” from the main menu and select “Descriptive Statistics”.
 Select “Frequencies…”.
 Within the “Frequencies” dialogue box, Click on “Charts”.

 Select either “Bar chart”, or “Pie chart”.


28

 Under “Chart Values”, select either “Frequencies” or “Percentages”.

 Click “Continue”.
 Click “OK”.

Output:

BAR CHART
29

PIE CHART

NOTE:
 Bar charts: either frequencies or percentages are used.
 Pie charts: usually percentages are used.

 Double click the graph and a “Chart Editor” window will appear.
 You can click on the graph in the “Chart Editor” to edit the graph as you please
(e.g. show labels).
30

 You can also double click the specific parts of the graph in “Chart Editor” to do
further editing (e.g. change font size, color)

EXERCISE 4:

Present the descriptives for “Ethnicity” using a graphical form. Try both bar chart and
pie chart.
31

Discussion:
 For ordinal variables, what are the appropriate graphical methods to display the
results of the descriptive analysis?

EXAMPLE 2 (BOX-AND-WHISKER PLOTS):

Objective: To display the descriptives for “Modified Ashworth Scale of Spasticity”


using a Box-and-Whisker Plot.

Procedures:
 Click “Graphs” from the main menu.
 Select ‘Legacy Dialogs”, and “Boxplot…”.

 Select “Simple”.

 Select “Summaries of separate variables” under the “Data in Chart Are”.


 Click “Define”.
32

 Highlight the variable of interest (e.g. Modified Ashworth Scale of Spasticity)


in the box on the left.
 Transfer the variable into the box on the right named “Boxes Represent”.

 Click “OK”.

Output:

 The upper limit of the box represents:

 The thick line within the box represents:

 The lower limit of the box represents:

 The error bar represents:

EXERCISE 5:

Display the data for the variable “FIM walking score” using a Box-and-Whisker Plot.
33

SECTION 5: CONTINUOUS VARIABLES (TABLE FORM)

Discussion:
 For continuous variables, what are the appropriate statistics to measure:
o Central tendency?
o Variability?

EXAMPLE:

Objective: To present the descriptive statistics for “height” in table form.

Procedures:
 Click “Analyze” from the main menu.
 Select “Descriptive Statistics”.
 Select “Descriptives…”.
 Transfer the continuous variable (e.g. height) into the box “Variable(s)”.

 Click “Options”.
 Select “Mean”, “Std.deviaton”, “Variance”, “Minimum”, “Maximum”.

 Click “Continue”.
 Click “OK”.
34

Output:

Descriptive Statistics

N Minimum Maximum Mean Std. Deviation Variance


height in cm 20 168 187 177.14 6.015 36.185
Valid N (listwise) 20

EXERCISE 6:

Perform descriptive analysis for the variables “Weight” and “Onset” in a table form.

Minimum Maximum Mean Std. Deviation Variance


Weight in kg
Onset in years

EXRECISE 7:

Select only Asian subjects and repeat the above analysis.

Minimum Maximum Mean Std. Deviation Variance


Weight in kg
Onset in years
35

SECTION 6: CONTINUOUS VARIABLES (GRPHICAL FORM)

Discussion:
 For continuous variables, what are the appropriate graphical methods to display
the results of the descriptive analysis?

EXAMPLE 1 : LINE GRAPH

 Only use LINE GRAPH for variables that measure the same thing over time in the
same group of subjects (e.g. Berg time 1 and Berg time 2).

Objective: To display the variables “Berg balance score time 1 and time 2” using a line
graph.

Procedures:
 Click “Graphs” from the main menu.
 Select “Legacy Dialogs” and “Line…”.

 Select “Simple” and “Summaries of separate variables”.

 Click “Define”.
36

 Transfer the variables of interest (e.g. Berg time 1, Berg time 2) to the box
named “Line Represents”.

 Click “OK”.

Output:

50

40
Mean

30

20

10

Berg balance score Berg balance score


time 1 time 2

EXERCISE 8:

Display the variables “Absolute VO2 peak time 1” and “Absolute VO2 peak time 2”
using a line graph.
37

EXAMPLE 2: HISTOGRAM

Objective: To display the variable “height” in the form of a histogram.

Procedures:
 Click “Graphs” from the main menu.
 Select “Legacy Dialogs”, and “Histogram…”.

 Transfer the variable of interest (e.g. height) into the box named “Variable”.

 Click “OK”.
38

Output:

EXERCISE 9:

Display the variable “weight” in the form of a histogram.

EXERCISE 10:

Display the variable “age” in the form of a histogram.


39

EXAMPLE 3: ERROR BAR CHART

 Usually used to illustrate the mean and standard deviation OR the mean and
standard error in graphical form.

Objective: To display the variables “Berg_1” and “Berg_2” in the form of an error bar
chart.

Procedures:
 Click “Graphs” from the main menu.
 Select “Legacy Dialogs” and “Error bar…”.

 Select “Simple” and “Summaries of separate variables”.

 Click “Define”.
40

 Transfer the variables of interest (e.g. Berg_1 and Berg_2) into the box named
“Error bars”.

 Under “Bars Represent”, select the option you prefer (e.g. standard deviation).
 In the box “Multiplier”, Type in “1”. That means each error bar will represent 1
standard deviation.

 Click “OK”.
41

Output:

EXERCISE 11:

Display the variables “Abs_VO2_1” and “Abs_VO2_2” using an error bar chart.

You might also like