This assignment is designed to review the materials you learn in the
lab. Be sure to comment your code to clarify what you are doing. Not
only does it help with grading, but it will also help you when you
revisit it in the future. Please use either RMarkdown or
knitr to turn in your assignment. These are fully compatible
with R and LaTeX. If your code uses random number generation,
please use set.seed(12345)
for replicability. Please post
any questions on Piazza.
Explain, using minimal math or algebra, the following:
Open the newhamp
dataset from the faraway
R package. This dataset contains vote counts and other
demographic information from 276 wards (i.e., voting districts) in the
2008 Democratic Party presidential primary in the U.S. state of New
Hampshire.
pObama
is a function of
votesys
, povrate
, pci
, and
population
. Report and interpret each coefficient
substantively. Report and explain the significance (or lack thereof) of
the omnibus \(F\)-test statistic for
this model.votesys
is interacted with povrate
(you will
need to recode votesys
so that one factor takes value 0 and
the other takes value 1). Interpret, statistically and substantively,
the differences between the coefficient estimates for
votesys
, povrate
, and votesys
\(\times\) povrate
.