0% found this document useful (0 votes)
21 views28 pages

Data Analysis

The document provides a comprehensive overview of quantitative data analysis techniques, including data coding, descriptive statistics, correlation analysis, and data importation from Excel to SPSS. It outlines the processes for coding qualitative data, running statistical analyses, and visualizing data through graphs and histograms. Additionally, it discusses the interpretation of correlation results and the significance of findings in research contexts.

Uploaded by

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

Data Analysis

The document provides a comprehensive overview of quantitative data analysis techniques, including data coding, descriptive statistics, correlation analysis, and data importation from Excel to SPSS. It outlines the processes for coding qualitative data, running statistical analyses, and visualizing data through graphs and histograms. Additionally, it discusses the interpretation of correlation results and the significance of findings in research contexts.

Uploaded by

ocsler953
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Quantitative Data Analysis

 Data Coding
 Descriptive statistics
 Correlation of Coefficient
 Reading data from excel file
 Recoding (Transforming) Variables
Data Coding

 Refers to the process of converting qualitative or categorical data into numerical values
(codes) so that the data can be analyzed statistically.
 It involves assigning numerical codes to categories or responses, making it easier to
organize, process, and analyze the data.

 Example: For a gender variable:  For a satisfaction variable:


• 1 = Very Dissatisfied
you might assign:
• 1 = Male • 2 = Dissatisfied

• 2 = Female • 3 = Neutral

• 3 = Other • 4 = Satisfied
• 5 = Very Satisfied
Data Coding….
 Better way for data coding is to prepare a code sheet
 For example, consider a sample questionnaire below
Data Coding….
 Prepare a code sheet
Variable/Name Description/Label Coding Value Data type
id Unique identifier of None Scale
patient
sex Sex of patient 1=Male; 2=Female Nominal
age Age of patient None Scale
counsellor Counsellor seen by 1 = John ; 2 = Jane Nominal
patient
sessions Number of counselling None Scale
sessions
satisfaction Satisfaction with service 1 = Extremely dissatisfied Ordinal
2 = Very dissatisfied
3 = Dissatisfied
4 = Neutral
5 = Satisfied
6 = Very satisfied
7 = Extremely satisfied
 Load SPSS and define the variables in the variable view
 Next, switch to Data View and enter the following data
Sorting the data

 Sometimes it is useful to re-order the data, for example, if you wanted to visually examine
all the male cases together.
 To do this:
 Click Data, then  Click on the variable sex, then click the arrow
click Sort Cases (to the left of the Sort by box) to move it into
the Sort by box:
 Then click Ok
 To get the data back into its original order, go
back to Data/Sort Cases;
 Move back Sex variable from the Sort by box
and replace it Patient_id
 Click OK.
 Close the output viewer while not saving the
contents
 NB: You can actually sort by as many variables
as you want – at the same time. For example,

Sorted data you could sort the data by sex of patients and
age by putting both variables in the Sort by box
Descriptive statistics

Running frequencies in SPSS

2. Choose the variable by clicking with your


1. From the menu at the top of the
mouse..
screen click Analyze, then Descriptive
3. Move it across into the variables box by
Statistics then Frequencies.
clicking the arrow.
4. Now click OK.
Descriptive statistics

Running frequencies for measures of central tendency SPSS

1. Click Analyze, then Descriptive


Statistics, then Frequencies
2. Double-click (left mouse button)
the variables
3. Click Statistics and click in the
boxes next to mean, median, mode,
and minimum and maximum. Then
click Continue
4. De-select Display Frequency
Tables. Click Ok
Cross-tabulation: Sex and Counsellor

1. Click Analyze, then


Descriptive
Statistics, then Crosstabs
2. Move Sex to Row(s)
and Counsellor to
Column(s)
3. Click Cells
4. Check Column under
Percentages and click
continue
Correlation:
 Correlation analysis is applied to scale (continuous) data.
 This type of data includes variables measured at the interval or ratio levels, where
numeric values represent measurable quantities and the intervals between values are
meaningful
 Interval Data: Numeric data without a true zero point, but with meaningful differences
between values (e.g., temperature in Celsius or IQ scores).
 Ratio Data: Numeric data with a true zero point, allowing for meaningful comparison of
magnitudes (e.g., height, weight, income, and age).
 Use Pearson's correlation to analyze the relationship between two continuous variables
like height and weight, or test scores and hours of study.
 If variables are ordinal (ranked) but not continuous, you can use Spearman's rank-
order correlation.
Producing a scatterplot

1. From the menu click on Graphs, then


Chart Builder.
2. Select Scatter/Dot from the Gallery to
show the range of graphs available and
then drag the first ‘simple scatter’ graph
into the preview area.
3. Drag Age into the Y-axis box and
sessions into the X-axis box
4. Click Ok
5. Double click the output
6. Click Elements tab and select Fit Line
at Total
The strength of a correlation
 Apply a statistical test to determine the strength of correlation and whether or not it is
statistically significant (unlikely to have occurred by chance)
 The strength of a correlation is indicated on a scale ranging from −1 to +1 as illustrated

Cohen, 1988

 A value ranging from 0.1 to 0.4 would be classed as a weak correlation, and anything from
0.5 and above would be regarded as a strong correlation.
 A value approaching zero indicates the absence of any relationship between two variables
 A value of 1 indicates perfect correlation- this is unlikely in health and social research.
 The appropriate measure of correlation is the Pearson product-moment correlation
coefficient
Running the correlation

1.From the menu at the top of the


screen click: Analyze / Correlate /
Bivariate.
(bi meaning two and variate
meaning variable)
2. Move sessions and satisfaction
into the variables box
3. Ensure that the Pearson or
Spearman box is ticked. In this
case, Spearman
Output

 Spearman correlation between sessions and


satisfaction is, r = 0.584 and p = 0.001 <0.05
 Strong Positive correlation

 The information below this in the row, labelled Correlation is significant at the 0.01 level (2-
tailed) means: there is a less than 1% chance that the observed correlation between the two
variables is due to random chance, and the correlation is considered statistically significant
 It is therefore unlikely to have occurred by chance

 When reporting, make the following write- up


• There is a strong positive correlation between the two variables (r = .53, p = .003), with
a greater number of sessions being associated with a higher satisfaction rating.
The coefficient of determination
 But what does this ‘strong correlation’ of 0.58 actually mean in terms of ‘predicting’ one
value from another?
 In other words, to what extent can we say that patient satisfaction ratings are related to the
number of counselling sessions?
 The answer is the coefficient of determination (r 2). You can then simply multiply this by 100
to give a percentage value.
 In this case, 0.58 x 0.58 = 0.34.
 This implies that only 34 per cent of the variance in satisfaction ratings is related to
counselling sessions.
 It can be concluded that satisfaction ratings are related to the number of counselling
sessions but this only accounts for 34 per cent of the variance; there are other factors
involved.
Producing histograms to check for normal
distributions

1.From the menu at the top of the screen click


on Graphs then Chart Builder.
2. Select Histogram from the Gallery and drag
the first (Simple) Histogram into the preview
area.
3. Drag the variable Age to the X-axis.
4 . Click OK
5. Double click the output
6. Click Elements tab and select Show
Distribution Curve
Reading Data from Spreadsheet Formats

Preprocess Excel data to import into SPSS


 Create a copy of the original data in another sheet (SPSS data)
 Create a coding sheet for the SPSS data
 Code the data based on the code sheet
Importing data
 Select File → Open → Data
 Change to Excel in the section: Files of type
 Select the file you want to open
 You will be prompted with whether you want to make Variable names from the data in
the first row of the table being imported.
 Select the Worksheet where the data is located and specify the range (if any)
 Click on Continue to import the file into SPSS
 Import the excel SPSS data provided and define the variables
Example 2

Importing data
 Select File → Open → Data (test_data)
 Change to Excel in the section: Files of type
 Select the file you want to open
 You will be prompted with whether you want to make Variable names from the data in
the first row of the table being imported.
 Select the Worksheet where the data is located and specify the range (if any)
 Click on Continue to import the file into SPSS
 Import the excel data provided and define the variables
Reading Data from Spreadsheet Formats

Defining variables in the Variable View

Variable Label Value Measure

id Identification Number None Scale

sex Respondents’ sex 0 = Female Nominal

1 = Male

age Respondents’ age None Scale

1 = Single

2 = Married
marital Marital Status Nominal
3 = Divorced

4 = Widowed
Variable Label Value Measure

1 = Primary

2 = Secondary
edlevel Highest education level achieved Ordinal
3 = Vocational

4 = Undergraduate

5 = Post Graduate

weight Respondents weight in Kg None Scale

height Respondents height in cm None Scale

smoke Do you smoke? 1 = Yes Nominal

2 = No

getsleep Do you have a problem getting sleep? 0 = No Nominal

1 = Yes
Questions

 What is the number and percent of females and males in the sample? Explain the results
 What is the number and percent of Male respondents who are married?
 What is the number and percent of Married female respondents who had attained
undergraduate as their highest level of education
Recoding (Transforming) Variables
 Sometimes you will want to transform a variable by combining some of its categories or
values together
Example:
 The data given below represents the scores of 10 students in a final examination. Recode the
data giving code "1" to scores between 75 - 100, code 2 to scores between 61 - 74, code 3 to
scores between 41 - 60 and code 4 to scores between 0 - 40.

Final examination scores of 10 students


Scores 58 86 74 70 79 60 35 42 55 91
1. Enter the data in the SPSS Statistics 2.Click on Transform > Recode Into
Data Editor and name the variable Different Variables... in the top menu.
"Scores".
3. Transfer the variable you want to recode by 6. Enter the first range of "75 - 100" into the

selected it and pressing the arrow button, and Range: box within the –Old Value– area,

give the new variable a name and label. and set the new code to "1" into the Value:
box within the –New Value– area,

 Click the Add button


7. Repeat for all other values, such that you 8. You will have returned to the previous

are presented with the following screen: screen and will now have to click on the OK
button.

 Click the Continue button

You might also like