1 / 17

Crosstabs

Crosstabs. Types of relationships. Linear Spurious Intervening Interaction effects Suppression. Linear effects. Crosstabs analysis. Like a frequency table, it reports how many and what percentage fall into a particular category, but for two variables instead of one

zahina
Download Presentation

Crosstabs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Crosstabs

  2. Types of relationships • Linear • Spurious • Intervening • Interaction effects • Suppression

  3. Linear effects

  4. Crosstabs analysis Like a frequency table, it reports how many and what percentage fall into a particular category, but for two variables instead of one Not suitable for continuous variables; only for discretely measured variables It is sometimes useful to recode a variable with too many categories FOR THE PURPOSES OF ILLUSTRATION ONLY

  5. Conventions the independent variable is arranged across the top of the table Percentages should be calculated using COLUMN Stata syntax: tabulate var1 var2

  6. Is political participation caused by alienation from the political system? • Political participation – measured as number of activities and then collapsed 0-2 • Political alienation – measured as how ashamed of political system in Russia

  7. Crosstab Analysis

  8. Theory: Resource Curse • The presence of lucrative natural resources in country breeds corruption, as resources monies are diverted for personal gain. • Or, the presence of lucrative natural resources eases corruption, by keeping other monies from being diverted. • Measure: • Perceptions of Corruption (Transparency International)

  9. Dependent variable: corruption • Gathered from questionnaires given to international businesspeople. • Low values indicate more corruption. • Scale from 1-10, 10 being least corrupt.

  10. Measure of corruption Data=wbdata.dta, Stata code: histogram cpi2009score, freq

  11. Corruption collapsed Corruption Freq. Percent Cum. Scores [1,2] 23 12.78 12.78 (2,3] 59 32.78 45.56 (3,4] 30 16.67 62.22 (4,5] 20 11.11 73.33 (5,6] 15 8.33 81.67 (6,7] 12 6.67 88.33 (7,8] 8 4.44 92.78 (8,9] 9 5 97.78 (9,10] 4 2.22 100 Total 180 100

  12. Resource Curse Crosstab Analysis Resource Rents Corruption [1,11] (11,21] (21,31] (31,41] (41,51] (51,61] (61,71] Total [1,2] 11 4 1 0 1 0 0 17 (2,3] 19 4 5 2 0 1 1 32 (3,4] 12 1 2 0 1 1 0 17 (4,5] 9 2 2 0 0 0 0 13 (5,6] 7 0 1 0 0 0 0 8 (6,7] 5 0 0 2 0 0 0 7 (7,8] 3 0 1 0 1 0 0 5 (8,9] 2 0 0 0 0 0 0 2 (9,10] 2 0 0 0 0 0 0 2 Total 70 11 12 4 3 2 1 103

  13. Corruption R code: (Use dataset wbdata.dta) library(foreign) myFile <- file.choose() dat <- read.dta(myFile,header=TRUE) attach(dat) plot(resrents, corrupt, xlab="Range of Percent of Expenditures from Resources", ylab="Range of Perceptions of Corruption", main="Corruption and Resources")

  14. Data and crosstabs • Some useful notes: • Data=wbdata.dta • Stata code: tabulate corrupt resrents

  15. Correlation information Stata syntax: pwcorr corrupt resrents, data=wbdata

  16. Scatter plot R code: (Use dataset wbdata.dta) library(foreign) myFile <- file.choose() dat <- read.dta(myFile,header=TRUE) attach(dat) #Make Scatterplot scatterplot(cpi2009score~resourcerentspctofgdp, reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=dat)

  17. Syntax for scatter plot Stata code: twoway (lfitci cpi2009score resourcerentspctofgdp) (scatter cpi2009score resourcerentspctofgdp) -Note: the scatter above is done in a different program, stata graphs will look slightly different.

More Related