Analysis of Data for Measuring Food Availability, Access

```Srinivasulu Rajendran
Centre for the Study of Regional Development (CSRD)
Jawaharlal Nehru University (JNU)
New Delhi
India
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
Objective of the session
To understand two-way
anova through software
packages
1. What is the procedure to
perform Two-way ANOVA?
2. How do we interpret results?
Two-way ANOVA using SPSS
 The two-way ANOVA compares the mean differences
between groups that have been split on two
independent variables (called factors). You need two
independent,
categorical
variables and
one
continuous, dependent variable .
Objective
 We are interested in whether an monthly per capita
food expenditure was influenced by their level of
education and their gender head. Monthly per capita
food expenditure with higher value meaning a better
off. The researcher then divided the participants by
gender head of HHs i.e Male head & Female head HHs
and then again by level of education.
 In SPSS we separated the HHs into their appropriate
groups by using two columns representing the two
independent variables and labelled them “Head_Sex"
and “Head_Edu". For “head_sex", we coded males as
"1" and females as “0", and for “Head_Edu", we coded
illiterate as "1", can sign only as "2" and can read only as
"3“ and can read & write as “4”. Monthly per capita food
expenditure was entered under the variable name,
“pcmfx".
How to correctly enter your data into SPSS in order to
run a two-way ANOVA
Testing of Assumptions
 In SPSS, homogeneity of variances is tested using
Levene's Test for Equality of Variances. This is
included in the main procedure for running the twoway ANOVA, so we get to evaluate whether there is
homogeneity of variances at the same time as we get
the results from the two-way ANOVA.
STEP 1
Click Analyze > General Linear Model > Univariate...
on the top menu as shown below
STEP 2
You will be presented with the "Univariate" dialogue box:
STEP 3
 You need to transfer the dependent variable “pcmfx"
into the "Dependent Variable:" box and transfer both
the "Fixed Factor(s)”
STEP 4
Click on the Plot button. You will be presented with the
"Univariate: Profile Plots" dialogue box
STEP 5
 Transfer
the
independent
variable
from
the "Factors:" box
into
the
"Horizontal Axis:"
box and transfer
the
variable into the
"Separate
Lines:"
box. You will be
presented with the
following screen:
 [Tip:
Put
the
independent
variable with the
greater number of
levels
in
the
"Horizontal Axis:"
box.]
STEP 6 & 7
 Click the “add”
button
 You will see that
_sex" has been
"Plots:" box.
 Click
the
“continue”
button. This will
return you to the
"Univariate"
dialogue box.
STEP 8
Click the “Post Hoc..” button. You will be presented with the
"Univariate: Post Hoc Multiple Comparisons for Observed..."
dialogue box as shown below:
STEP 9
 Transfer “head_edu" from the "Factor(s):" box to the
"Post Hoc Tests for:" box. This will make the "Equal
Variances Assumed" section become active (loose the
"grey sheen") and present you with some choices for
which post-hoc test to use. For this example, we are going
to select "Tukey", which is a good, all-round post-hoc test.
 [You only need to transfer independent variables that
have more than two levels into the "Post Hoc Tests for:"
box. This is why we do not transfer “head_sex".]
 You will finish up with the following screen
 Click the “Continue” button to return to the "Univariate"
dialogue box
STEP 10
 Click the “option” button. This will present you with the
"Univariate: Options" dialogue box as shown below:
from the "Factor(s) and "Factor Interactions:" box into the
"Display Means for:" box. In the "Display" section, tick the
"Descriptive Statistics" and "Homogeneity tests" options. You
will presented with the following screen
 Click the “continue” button to return to the "Univariate"
dialogue box.
STEP 11
Click the “Ok” button to generate the output.
SPSS Output of Two-way ANOVA
 SPSS produces many tables in its output from a two-way
ANOVA and we are going to start with the "Descriptives"
table as shown below:
Descriptive Statistics
Dependent Variable:Per capita monthly food expenditure (taka)
Household - Sex
Male
Female
Total
1
2
3
4
Total
1
2
4
Total
1
2
3
4
Total
Mean
939.8895
998.0697
858.3107
1137.9562
1055.2881
962.6195
967.0070
1205.5084
1056.1239
943.3501
993.8665
858.3107
1143.5946
1055.3809
Std. Deviation
455.16118
491.73339
383.20545
534.76858
512.60856
627.75916
424.26461
607.04529
574.00781
484.17553
482.62690
383.20545
540.95653
519.52636
N
245
262
20
571
1098
44
41
52
137
289
303
20
623
1235
This table is very useful as it provides
the mean and standard deviation for
the groups that have been split by
both independent variables. In
addition, the table also provides
"Total" rows, which allows means
and standard deviations for groups
only split by one independent
variable or none at all to be known.
From this table we can
see that we don’t have
homogeneity
of
variances
of
the
dependent
variable
across groups. We
know this as the Sig.
value is less than 0.05,
which is the level we
set for alpha. So we
have concluded that
the variance across
groups
was
significantly different
(unequal).
Levene's Test of Equality of Error Variancesa
Dependent Variable:Per capita monthly food expenditure
(taka)
F
2.335
df1
6
df2
1228
Sig.
.030
Tests the null hypothesis that the error variance of the
dependent variable is equal across groups.
a. Design: Intercept + head_sex + head_edu +
Tests of Between-Subjects Effects Table
 The table shows the actual results of the two-way ANOVA as
shown
 We are interested in the head of hhs gender, education and
head_sex*head_edu rows of the table as highlighted above.
These rows inform us of whether we have significant mean
differences between our groups for our two independent
variables, head_sex and head_edu, and for their interaction,
We
must
first
look
at
the
head_sex*head_edu interaction as this is the most important
result we are after. We can see from the Sig. column that we have
a statistically NOT significant interaction at the P = .686 level.
You may wish to report the results ofhead_sex and head_edu as
well. We can see from the above table that there was no
significant difference in monthly per capita food exp between
head_sex (P = .675) but there were significant differences
between educational levels (P < .000).
Tests of Between-Subjects Effects
Dependent Variable:Per capita monthly food expenditure (taka)
Source
Corrected Model
Type III Sum of
Squares
10669432
df
6
Mean Square
1778239
F
6.773
Sig.
.000
Intercept
279013110
1
279013110
1062.753
.000
46145
1
46145
.176
.675
5527869
3
1842623
7.019
.000
197900
2
98950
.377
.686
Error
322396593
1228
262538
Total
1708644528
1235
Corrected Total
333066026
1234
```