QOI: Bush got benefit after introducing Buchannon in Florida?
library(Sleuth3)
head(ex1222)
## County Buchanan2000 Gore2000 Bush2000 Nader2000 Browne2000 Total2000
## 1 Alachua 262 47300 34062 3215 658 85235
## 2 Baker 73 2392 5610 53 17 8072
## 3 Bay 248 18850 38637 828 171 58486
## 4 Bradford 65 3072 5413 84 28 8597
## 5 Brevard 570 97318 115185 4470 643 217616
## 6 Broward 789 386518 177279 7099 1212 572108
## Clinton96 Dole96 Perot96 Buchanan96p ReformReg TotalReg
## 1 40144 25303 8072 2151 91 120867
## 2 2273 3684 667 73 4 12352
## 3 17020 28290 5922 1816 55 92749
## 4 3356 4038 819 155 3 13547
## 5 80416 87980 25249 7927 148 283680
## 6 320736 142834 38964 10966 332 887764
df = 0
df$log_x <- log(ex1222$Buchanan2000)
## Warning in df$log_x <- log(ex1222$Buchanan2000): Coercing LHS to a list
df$log_y <- log(ex1222$Bush2000)
df$log_z <- log(ex1222$Gore2000)
#model Bush vs Gore
model1 <- lm(log_y ~ log_x, data = df)
#model Bush vs Gore after Buch
model2 <- lm(log_y ~ log_x + log_z, data = df)
#model Bush vs Gore after Buch interaction
model2 <- lm(log_y ~ log_x + log_z + log_x*log_z, data = df)
Bush vs Gore is linear relationship (red) with 0.886 of slope. Bush is leading little bit(?). After introducing Buchannon (blue), the slope is 0.293. Bush is leading a lot (?). AFter introducing intercation with Buch and Gore (green) the slope is 0.756. Bush is leading little more (?)
Q1. Does the interaction term mean there is suspect interaction between Buchannon and Gore? Q2. How much?