Created
February 26, 2023 00:22
-
-
Save diamonaj/614f7226e5c4d31c94a2c72be4688f1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd <- read.csv("progresa.csv") | |
dim(dd) | |
dd <- na.omit(dd) | |
dim(dd) | |
### QUESTION 1 | |
# An example of what I'm looking for | |
par(mfrow = c(2,1)) | |
hist(dd$votos1994[dd$treatment==1], col = "red", | |
main = "Distribution of Votos 1995 for the treatment group", | |
xlab = "Votos 1995", xlim = c(0, 1500), breaks = 25) | |
hist(dd$votos1994[dd$treatment==0], col = "blue", | |
main = "Distribution of Votos 1995 for the control group", | |
xlab = "Votos 1995", xlim = c(0, 1500), breaks = 25) | |
### QUESTION 2 | |
# there was a typo in the question... it referred to | |
#"prd1994" but it should have said "prd1994v" | |
# so either reg1 or reg2 is fine | |
reg1 <- lm(t2000r ~ treatment + avgpoverty + I(log(pobtot1994)) | |
+ t1994r + pri1994v + pan1994v + prd1994, | |
data = dd) | |
summary(reg1) | |
reg2 <- lm(t2000r ~ treatment + avgpoverty + I(log(pobtot1994)) | |
+ t1994r + pri1994v + pan1994v + prd1994v, | |
data = dd) | |
summary(reg2) | |
# Question 2 question also suggested an additional regression with an | |
# addtional outcome variable: | |
# pri2000s -- so some students may have ALSO run either this regression: | |
### reg3 <- | |
### lm(pri2000v ~ treatment + avgpoverty + I(log(pobtot1994)) + | |
### t1994r + pri1994v + pan1994v + prd1994, data = dd) | |
#or this one | |
### reg4 <- | |
### lm(pri2000v ~ treatment + avgpoverty + I(log(pobtot1994)) + | |
### t1994r + pri1994v + pan1994v + prd1994v, data = dd) | |
# All the estimates are rather small and do not provide strong | |
# support for the hypothesis that the CCT program increases turnout and | |
# support for the incumbent party. | |
######### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment