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