slide1
Download
Skip this Video
Download Presentation
Bivariate Regression

Loading in 2 Seconds...

play fullscreen
1 / 25

Bivariate Regression - PowerPoint PPT Presentation


  • 107 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Bivariate Regression' - zoie


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Bivariate Regression

Political

Participation

Political

Contestation

slide2

Bivariate Regression

Rule of Law

Political

Participation

slide3

Trivariate Regression

Rule of Law

Political

Participation

Political

Contestation

slide4

Crosstab: Contestation and

Participation

Note: Variables are continuous, but grouped by quantiles for

purposes of exposition.

slide7

Crosstab: Rule of Law and Participation

Note: Variables are continuous, but grouped by quantiles for

purposes of exposition.

slide10

Crosstab: Participation and Contestation controlling for Rule of Law

Contestation (quantiles)

Participation

(quantiles)

slide12

Crosstab: Presidential Vote (2008) and Liberalism, controlling for Presidential Vote (2004)

Rule of Law

Participation

explaining venn diagrams
Explaining Venn Diagrams

Variance

Participation

explaining venn diagrams1
Explaining Venn Diagrams

Variance

Contestation

explaining venn diagrams2
Explaining Venn Diagrams

Variance

Rule of Law

slide22

Pearson r = .83

Rule of

Law

Contestation

Pearson r = .90

Participation

Contestation

Participation

Pearson r = .91

Rule of

Law

slide23

Participation

Rule of Law

Contestation

slide25

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)

ad