1 / 25

Bivariate Regression

Bivariate Regression. Political Participation. Political Contestation. Bivariate Regression. Rule of Law. Political Participation. Trivariate Regression. Rule of Law. Political Participation. Political Contestation. Crosstab: Contestation and Participation.

zoie
Download Presentation

Bivariate Regression

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. Bivariate Regression Political Participation Political Contestation

  2. Bivariate Regression Rule of Law Political Participation

  3. Trivariate Regression Rule of Law Political Participation Political Contestation

  4. Crosstab: Contestation and Participation Note: Variables are continuous, but grouped by quantiles for purposes of exposition.

  5. Correlation: Contestation and Participation

  6. Bivariate Regression: Contestation and Participation

  7. Crosstab: Rule of Law and Participation Note: Variables are continuous, but grouped by quantiles for purposes of exposition.

  8. Correlation: Rule of Law and Participation

  9. Bivariate Regression: Participation and Rule of Law

  10. Crosstab: Participation and Contestation controlling for Rule of Law Contestation (quantiles) Participation (quantiles)

  11. Correlation: Participation and Contestation, Controlling for Rule of Law

  12. Crosstab: Presidential Vote (2008) and Liberalism, controlling for Presidential Vote (2004) Rule of Law Participation

  13. Correlation: Participation and Rule of Law, Controlling for Contestation

  14. Correlations

  15. Explaining Venn Diagrams Variance Participation

  16. Explaining Venn Diagrams Variance Contestation

  17. Explaining Venn Diagrams Variance Rule of Law

  18. Putting Them Together

  19. Plot showing positive covariance

  20. Plot showing negative covariance

  21. Plot showing no covariance

  22. Pearson r = .83 Rule of Law Contestation Pearson r = .90 Participation Contestation Participation Pearson r = .91 Rule of Law

  23. Participation Rule of Law Contestation

  24. Multivariate Regression: Participation, controlling for Contestation and Rule of Law

  25. Appendix: Syntax R Code: library(foreign) #Choose the file `class_qog.dta' myFile <- file.choose() dat <- read.dta(myFile,header=TRUE) attach(dat) q <- quantile(dat$cam_contest, c(0, .25, .50, .75, 1), na.rm=T) contestq <- cut(dat$cam_contest, q, include.lowest=T) levels(contestq) <- c("1st", "2nd", "3rd", "4th") q <- quantile(dat$bti_pp, c(0, .25, .50, .75, 1), na.rm=T) dat$ppq <- cut(dat$bti_pp, q, include.lowest=T) levels(dat$ppq) <- c("1st", "2nd", "3rd", "4th") q <- quantile(dat$bti_rol, c(0, .25, .50, .75, 1), na.rm=T) dat$rolq <- cut(dat$bti_rol, q, include.lowest=T) levels(dat$rolq) <- c("1st", "2nd", "3rd", "4th") attach(dat) #Making the crosstabs table .Table <- xtabs(~ppq+contestq, data=dat) .Table #Correlation Tables cor(dat[,c("bti_pp","cam_contest")], use="complete.obs") cor(dat[,c("bti_pp","cam_contest")], use="complete.obs", method="spearman") mod<-lm(bti_pp~cam_contest, data=dat) #I did not standardize the coefficients, but that can be done like this: sdev.cont<-sd(cam_contest, na.rm=T) sdev.part<-sd(bti_pp, na.rm=T) std.b.cont <- mod$coefficients[2] * (sdev.cont / sdev.part) scatterplot(fh_polity2~cam_contest | rolq, reg.line=lm, smooth=TRUE, ylab="Democracy (Polity) Score", xlab="Level of Contestation", main="Contestation and Democracy \n (by rule of law quantiles)", spread=TRUE, boxplots='xy', span=0.5, by.groups=TRUE, data=dat) #Participation and Rule of Law #Making the crosstabs table .Table <- xtabs(~ppq+rolq, data=dat) .Table #Correlation Tables cor(dat[,c("bti_pp","bti_rol")], use="complete.obs") cor(dat[,c("bti_pp","bti_rol")], use="complete.obs", method="spearman") .Table1 <- xtabs(~ppq+rolq+contestq, data=dat) .Table1 .Table2 <- xtabs(~ppq+contestq+rolq, data=dat) .Table2 cor(dat[,c("bti_pp","bti_rol", "cam_contest")], use="complete.obs") cor(dat[,c("bti_pp","bti_rol", "cam_contest")], use="complete.obs", method="spearman") xyplot(bti_pp~cam_contest | rolq, pch=16, ylab="Participation", xlab="Contestation", main="Participation and Contestation \n by Rule of Law Quantiles", auto.key=list(border=TRUE), par.settings = simpleTheme(pch=16), scales=list(x=list(relation='same'), y=list(relation='same')), data=dat) xyplot(bti_pp ~ bti_rol | contestq, pch=16, ylab="Participation", xlab="Rule of Law", main="Participation and Rule of Law \n by Contestation Quantiles", auto.key=list(border=TRUE), par.settings = simpleTheme(pch=16), scales=list(x=list(relation='same'), y=list(relation='same')), data=dat) #Putting them together #Plot 1 par(mfrow=c(1,2)) scatterplot(bti_pp~cam_contest | rolq, reg.line=lm, smooth=TRUE, ylab="Participation", xlab="Level of Contestation", main="Participation and Contesation \n (by rule of law quantiles)", spread=TRUE, boxplots='xy', span=0.5, by.groups=TRUE, data=dat) #Plot 2 scatterplot(bti_pp~bti_rol | contestq, reg.line=lm, smooth=TRUE, ylab="Participation", xlab="Rule of Law", main="Participation and Rule of Law \n (by Contestation quantiles)", spread=TRUE, boxplots='xy', span=0.5, by.groups=TRUE, data=dat) #Positive Relationship [code omitted - uses a different dataset] #Negative Relationship scatterplot(wdi_mort~log(gle_gdp) , reg.line=lm, smooth=TRUE, ylab="Infant Mortality", xlab="GDP Per Capita(logged)", main="Infant Mortality and GDP", col="black", spread=TRUE, boxplots='xy', span=0.5, by.groups=TRUE, data=dat) #Insignificant Relationship [code omitted - uses different dataset] #Linear Regression summary(lm(bti_pp~cam_contest+bti_rol)) Stata Code: tabulate ppq contestq2, cchi2 chi2 column cor bti_pp cam_contest cam_contest reg bti_pp cam_contest twoway (lfitci bti_pp cam_contest) (scatter bti_pp cam_contest) tabulate ppq rolq, cchi2 chi2 column cor bti_pp bti_rol cam_contest reg bti_pp bti_rol twoway (lfitci bti_pp cam_contest) (scatter Bti_pp cam_contest) by rolq2, sort : tabulate ppq contestq2, cchi2 chi2 column by contestq, sort: tabulate ppq rolq, cchi2 chi2 column cor bti_pp cam_contest bti_rol twoway (lfitci bti_pp cam_contest) (scatter bti_pp cam_contest), by(rolq2) twoway (lfitci bti_pp bti_rol) (scatter bti_pp bti_rol), by(contestq)

More Related