R code for Problem Set 5…. easy!

competition <- read.table(“C:\\Data\\Econ 135 Gender\\competitivereadingcamp.csv”, header=TRUE, sep=”,”)
names(competition )

# first make tables
with(competition , tapply(score1 , list(female , treatment ), mean))
with(competition , tapply(score2 , list(female , treatment ), mean))

# now run regression
fit <- lm(score2 ~ female + competitive + africanbooks+pretest
+compafrica + female+ femalecomp+ femaleafrica +femalecompafrica
+vildum1 +vildum2 +vildum3 +vildum4 +vildum5+ t
, data=competition )
summary(fit) # show results

Unknown's avatar

About mkevane

Economist at Santa Clara University and Director of Friends of African Village Libraries.
This entry was posted in Burkina Faso. Bookmark the permalink.