topic 14 two anova
TRANSCRIPT
![Page 1: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/1.jpg)
Two-way Anova, Consumption Pattern and Poverty Estimation: SPSS/STATA
Srinivasulu RajendranCentre for the Study of Regional Development (CSRD)
Jawaharlal Nehru University (JNU)New Delhi
![Page 2: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/2.jpg)
Objective of the session
To understand two-way anova through software packages
![Page 3: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/3.jpg)
1. What is the procedure to perform Two-way ANOVA?2. How do we interpret results?
![Page 4: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/4.jpg)
Two-way ANOVA using SPSSThe 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 .
![Page 5: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/5.jpg)
ObjectiveWe 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.
![Page 6: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/6.jpg)
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".
![Page 7: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/7.jpg)
How to correctly enter your data into SPSS in order to run a two-way ANOVA
![Page 8: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/8.jpg)
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 two-way 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.
![Page 9: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/9.jpg)
STEP 1
![Page 10: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/10.jpg)
Click Analyze > General Linear Model > Univariate... on the top menu as shown below
![Page 11: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/11.jpg)
STEP 2
![Page 12: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/12.jpg)
You will be presented with the "Univariate" dialogue box:
![Page 13: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/13.jpg)
STEP 3
![Page 14: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/14.jpg)
You need to transfer the dependent variable “pcmfx" into the "Dependent Variable:" box and transfer both independent variables, “head_sex" and “head_edu", into the "Fixed Factor(s)”
![Page 15: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/15.jpg)
STEP 4
![Page 16: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/16.jpg)
Click on the Plot button. You will be presented with the "Univariate: Profile Plots" dialogue box
![Page 17: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/17.jpg)
STEP 5
![Page 18: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/18.jpg)
Transfer the independent variable “head_edu" from the "Factors:" box into the "Horizontal Axis:" box and transfer the “head_sex" 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.]
![Page 19: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/19.jpg)
STEP 6 & 7
![Page 20: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/20.jpg)
Click the “add” button
You will see that “head_edu*head_sex" has been added to the "Plots:" box.
Click the “continue” button. This will return you to the "Univariate" dialogue box.
![Page 21: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/21.jpg)
STEP 8
![Page 22: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/22.jpg)
Click the “Post Hoc..” button. You will be presented with the "Univariate: Post Hoc Multiple Comparisons for Observed..." dialogue box as shown below:
![Page 23: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/23.jpg)
STEP 9
![Page 24: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/24.jpg)
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
![Page 25: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/25.jpg)
![Page 26: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/26.jpg)
STEP 10
![Page 27: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/27.jpg)
Click the “option” button. This will present you with the "Univariate: Options" dialogue box as shown below:
Transfer “head_sex", “head_edu" and “head_sex*head_edu" 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.
![Page 28: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/28.jpg)
![Page 29: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/29.jpg)
STEP 11
![Page 30: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/30.jpg)
Click the “Ok” button to generate the output.
![Page 31: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/31.jpg)
SPSS Output of Two-way ANOVA
![Page 32: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/32.jpg)
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)
Head of the Household - Sex (sum) head_edu Mean Std. Deviation NMale 1 939.8895 455.16118 245
2 998.0697 491.73339 262
3 858.3107 383.20545 20
4 1137.9562 534.76858 571
Total 1055.2881 512.60856 1098
Female 1 962.6195 627.75916 44
2 967.0070 424.26461 41
4 1205.5084 607.04529 52
Total 1056.1239 574.00781 137
Total 1 943.3501 484.17553 289
2 993.8665 482.62690 303
3 858.3107 383.20545 20
4 1143.5946 540.95653 623
Total 1055.3809 519.52636 1235
![Page 33: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/33.jpg)
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.
![Page 34: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/34.jpg)
Levene's Test of Equality of Error Variancesa
Dependent Variable:Per capita monthly food expenditure (taka)
F df1 df2 Sig.2.335 6 1228 .030
Tests the null hypothesis that the error variance of the dependent variable is equal across groups.a. Design: Intercept + head_sex + head_edu + head_sex * head_edu
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).
![Page 35: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/35.jpg)
Tests of Between-Subjects Effects TableThe table shows the actual results of the two-way
ANOVA as shownWe 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, head_sex*head_edu. 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).
![Page 36: Topic 14 two anova](https://reader035.vdocuments.us/reader035/viewer/2022062405/554eabe1b4c905fb7c8b4df5/html5/thumbnails/36.jpg)
Tests of Between-Subjects Effects
Dependent Variable:Per capita monthly food expenditure (taka)
SourceType III Sum of
Squares df Mean Square F Sig.Corrected Model 10669432 6 1778239 6.773 .000
Intercept 279013110 1 279013110 1062.753 .000
head_sex 46145 1 46145 .176 .675
head_edu 5527869 3 1842623 7.019 .000
head_sex * head_edu
197900 2 98950 .377 .686
Error 322396593 1228 262538
Total 1708644528 1235
Corrected Total 333066026 1234