The visualization example at the end of this post
Line 301 here should be ggplot(mavg.pred) + not ggplot(d) +
|
m2.pred <- broom::augment(m2) |
|
m2.weight <- reported.table[2, "weight"] |
|
m3.weight <- reported.table[3, "weight"] |
|
mavg.pred <- m2.weight$weight * m2.pred[ , -(1:2)] + m3.weight$weight * m3.pred[ , -(1:3)] |
|
mavg.pred <- cbind(m3.pred[1:3], mavg.pred) |
|
|
|
library(ggplot2) |
|
ggplot(d) + |
|
geom_point(aes(Dept, Admitted / (Admitted + Rejected), color=Gender, |
|
size=Admitted + Rejected), |
|
position = position_dodge(width = 0.5)) + |
|
geom_pointrange(aes(Dept, plogis(.fitted), |
|
ymin = plogis(.fitted - 2 * .se.fit), |
|
ymax = plogis(.fitted + 2 * .se.fit), |
|
shape=Gender), |
|
position=position_dodge(width = 0.5), data =mavg.pred, alpha=0.4) + |
|
theme_minimal() + scale_color_manual(values=c("blue", "orange"))</code></pre> |
The visualization example at the end of this post
Line 301 here should be
ggplot(mavg.pred) +notggplot(d) +ashander.github.io/posts/2015/10/model-selection-glms-aic-what-to-report/index.html
Lines 294 to 310 in c398f07