What’s Your Malfunction?
Must be submitted for Peer Commentary by 8:00 pm
Wednesday, March 12.
Peer Commentary and Final Homework DUE at 5:00 pm
Monday, March 17.
Create a new GitHub repo and git-referenced
Rstudio Project called
“AN588_Malfunction_BUlogin”. Within that repo, create a
new .Rmd
file called
“BUlogin_OriginalHomeworkCode_04”. Don’t forget to add
your Peer
Group and instructor as collaborators, and to accept their
invitations to you. Making sure to push both the markdown and knitted
.html
files to your repository, do the following:
[2] The dataset from Kamilar and Cooper has in it a large number of
variables related to life history and body size. For this exercise, the
end aim is to fit a simple linear regression model to predict longevity
(MaxLongevity_m
) measured in months from species’ brain
size (Brain_Size_Species_Mean
) measured in grams. Do the
following for both longevity~brain size
and
log(longevity)~log(brain size)
:
- Fit the regression model and, using {ggplot2}, produce a scatterplot
with the fitted line superimposed upon the data. Append the the fitted
model equation to your plot (HINT: use the function
geom_text()
).
- Identify and interpret the point estimate of the slope (\(\beta_1\)), as well as the outcome of the
test associated with the hypotheses H0: \(\beta_1\) = 0; HA: \(\beta_1\) ≠ 0. Also, find a 90 percent CI
for the slope (\(\beta_1\))
parameter.
- Using your model, add lines for the 90 percent confidence and
prediction interval bands on the plot and add a legend to differentiate
between the lines.
- Produce a point estimate and associated 90 percent PI for the
longevity of a species whose brain weight is 800 gm. Do you trust the
model to predict observations accurately for this value of the
explanatory variable? Why or why not?
- Looking at your two models, which do you think is better? Why?
Your Final Assignment for Homework 03
Your final assignment, due to me by 5:00 pm on March 17, is to have in
your
AN588_Malfunction_BUlogin repo only the following files
(aside from repo basics like an
.Rproj
and
README
file):
- The FINAL PUSH of your Original Homework Code, including
the five challenges you faced, as pushed to your repo by 5:00 pm on
Wednesday, November 1st, an R Markdown file named
BUlogin_OriginalHomeworkCode_04.
- The FINAL PUSH of the Peer
Commentary made on your code, an R Markdown file named
Peerlogin_PeerCommentary_BUlogin_04 or
PeerGroupX_PeerCommentary_BUlogin_04.
- The FINAL PUSH of your Final Homework Code, which has taken
into account any changes recommended from the Peer Commentary and notes,
an R Markdown file named BUlogin_FinalHomeworkCode_04.
NOTE: If you want your homework code to look nice (beyond being
very well annotated and commented), and be easy to use by
others, you can check out the relatively simply example R
Markdown templates in the AN588_Week_3_caschmit
repo.
Please also consider consulting the following helpful guidelines on how
to write effective
R Markdown documents (also available
at the end of
Module
03), which go well beyond the simple formatting of the templates.