topic 13 con pattern spss

29
Consumption Pattern : SPSS/STATA Srinivasulu Rajendran Centre for the Study of Regional Development (CSRD) Jawaharlal Nehru University (JNU) New Delhi India [email protected]

Upload: nfpcsp

Post on 16-May-2015

586 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Topic 13 con pattern spss

Consumption Pattern : SPSS/STATA

Srinivasulu RajendranCentre for the Study of Regional Development (CSRD)

Jawaharlal Nehru University (JNU)New Delhi

[email protected]

Page 2: Topic 13 con pattern spss

Objective of the session

To understand consumption

pattern through software packages

Page 3: Topic 13 con pattern spss

1. How to Analyze consumption pattern?2. What are procedure available for estimating consumption pattern and how to do with Econometric software

Page 4: Topic 13 con pattern spss

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 13 con pattern spss

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 13 con pattern spss

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 13 con pattern spss

How to correctly enter your data into SPSS in order to run a two-way ANOVA

Page 8: Topic 13 con pattern spss

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 13 con pattern spss

Perform the two-anova test procedure which is explained in the previous session.

Page 10: Topic 13 con pattern spss

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 11: Topic 13 con pattern spss

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     

Page 12: Topic 13 con pattern spss

Multiple Comparisons Table

Page 13: Topic 13 con pattern spss

Multiple Comparisons

Per capita monthly food expenditure (taka)Tukey HSD

(I) (sum) head_edu

(J) (sum) head_ed

u

Mean Difference (I-

J) Std. Error Sig.

95% Confidence Interval

Lower Bound

Upper Bound

1 2 -50.5163 42.12953 .628 -158.8968

57.8641

3 85.0395 118.47081 .890 -219.7329

389.8118

4 -200.2444* 36.46704 .000 -294.0578

-106.4310

2 1 50.5163 42.12953 .628 -57.8641 158.8968

3 135.5558 118.29353 .661 -168.7605

439.8721

4 -149.7281* 35.88692 .000 -242.0491

-57.4071

3 1 -85.0395 118.47081 .890 -389.8118 219.7329

2 -135.5558 118.29353 .661 -439.8721

168.7605

4 -285.2839 116.39719 .068 -584.7218

14.1540

4 1 200.2444* 36.46704 .000 106.4310 294.0578

2 149.7281* 35.88692 .000 57.4071 242.0491

3 285.2839 116.39719 .068 -14.1540 584.7218

We can see from the table that there is some repetition of the results but, regardless of which row we choose to read from, we are interested in the differences between (1) illiterate, (2) can sign, (3) can read, (4) can read & write. From the results we can see that there is a significant difference between selected different combinations of educational level (P < .0005).

Page 14: Topic 13 con pattern spss

Per capita monthly food expenditure (taka)

Tukey HSDa,,b,,c

(sum) head_edu

NSubset

1 2

3 20 858.3107  

1 289 943.3501 943.3501

2 303 993.8665 993.8665

4 623   1143.5946

Sig.   .409 .101

Homogeneous Subsets

Overall, both subset shows insignificant, there was no homogeneous among subsets

Page 15: Topic 13 con pattern spss

Plot of the Results

Page 16: Topic 13 con pattern spss

The following plot is not of sufficient quality to present in your reports but provides a good graphical illustration of your results. In addition, we can get an idea of whether there is an interaction effect by inspecting whether the lines are parallel or not.

Page 17: Topic 13 con pattern spss

From this plot we can see how our results from the previous table might make sense. Remember that if the lines are not parallel then there is the possibility of an interaction taking place.

Page 18: Topic 13 con pattern spss

Procedure for Simple Main Effects in SPSSYou can follow up the results of a significant

interaction effect by running tests for simple main effects - that is, the mean difference in monthly per capita food expenditure between head of gender HHs at each education level. SPSS does not allow you to do this using the graphical interface you will be familiar with, but requires you to use syntax.

Page 19: Topic 13 con pattern spss

Step 1

Page 20: Topic 13 con pattern spss

Click File > New > Syntax from the main menu as shown below

Page 21: Topic 13 con pattern spss

You will be presented with the Syntax Editor as shown below:

Type text into the syntax editor so that you end up with the following (the colours are automatically added):

[Depending on the version of SPSS you are using you might have suggestion boxes appear when you type in SPSS-recognised commands, such as, UNIANOVA. If you are familiar with using this type of auto-prediction then please feel free to do so, but otherwise simply ignore the pop-up suggestions and keep typing normally

Page 22: Topic 13 con pattern spss

UNIANOVA pcmfx BY head_sex head_edu/EMMEANS TABLES(head_sex*head_edu)

COMPARE(head_sex)

Page 23: Topic 13 con pattern spss

Basically, all text you see above that is in CAPITALS, is required by SPSS and does not change when you enter your own data. Non-capitalised text represents your variables and will change when you use your own data. Breaking it all down, we have:

UNIANOVA Tells SPSS to use the Univariate Anova command

pcmfx BY head_sex, head_eduYour dependent variable BY your two independent variables (with a space between them)

/EMMEANS Tells SPSS to calculate estimated marginal means

TABLES(head_sex*head_edu)Generate statistics for the interaction term. Put your two independent variables here, separated by a * to denote an interaction

COMPARE(head_sex)Tells SPSS to compare the interaction term between genders

Page 24: Topic 13 con pattern spss

Making sure that the cursor is at the end of row 2 in the syntax editor click the button, which will run the syntax you have typed. Your results should appear in the Output Viewer below the results you have already generated.

Page 25: Topic 13 con pattern spss

SPSS Output of Simple Main Effects

Page 26: Topic 13 con pattern spss

Univariate Tests

Dependent Variable:Per capita monthly food expenditure (taka)

(sum) head_eduSum of

Squares dfMean

Square F Sig.1 Contrast 19272 1 19272 .073 .786

Error 322396593

1228 262538   

2 Contrast 34207 1 34207 .130 .718

Error 322396593

1228 262538   

3 Contrast 0 0 . . .

Error 322396593

1228 262538   

4 Contrast 217485 1 217485 .828 .363

Error 322396593

1228 262538   

This table shows us whether there are statistical differences in mean monthly per capita food expenditure between head of gender for each educational level. We can see that there are no statistically significant mean differences between male and females' headed HHs in pcmfx when head of HHs are educated to illetrate (P = .785) or can sign (P = .718) so on.

Page 27: Topic 13 con pattern spss

Reporting the results of a two-way ANOVA

Page 28: Topic 13 con pattern spss

You should emphasize the results from the interaction first, before you mention the main effects. In addition, you should report whether your dependent variable was normally distributed for each group and how you measured it (we will provide an example below).

A two-way ANOVA was conducted that examined the effect of head of gender and education level on per capita monthly food expenditure. There was no homogeneity of variance between groups as assessed by Levene's test for equality of error variances. There was a no significant interaction between the effects of head of gender and education level on per capita monthly food expenditure, F =0.377, P = .686. Simple main effects analysis showed that male headed HH were NOT significantly different in monthly per capita food expenditure than female headed HH when educated to read & write, but there were differences in monthly per capita food expenditure when the head of HHs educated to read & write (P = .000), However, there was no significant different between male head and female head HHs in pcmfx.

Page 29: Topic 13 con pattern spss

Hands-on Exercises

1. Find out whether an monthly per capita total expenditure was influenced by their gender head and districts.

2. Find out whether an monthly per capita total expenditure was influenced by the village those who adopted technology and districts.