Homework 10

Due: 2024-04-30, 11:59pm

Submission instructions

For this homework you should submit a ZIP archive containing:

  • A single document with the answers to all the following items in HTML format only. Make sure you include plain English blocks in between the code, and its output to interpret what R is giving you.
  • Code file used to generate the answers (RMD format). There should be comments in the code blocks.

  • Jupyter notebook (IPYNB) is okay.
  • Please remember to mix your comments with code and output.
  • Do not forget acknowledgements.

1. Frog abnormalities data

Use the frog abnormalities data from Reeves et. al. 21 wetland sites in Alaska. Read in the abnormalities file which has information about the individual frogs studied.

  • Tabulate the number of frogs per site.
  • Fit a fixed effects linear model for predicting the snout-to-vent length (SVL) in each site.
  • Fit a mixed effects model for snout-to-vent length with a random intercept for each site. How does the variance between sites compare to the variance within sites?
  • Fit a mixed effects model for snout-to-vent length using site and whether or not the frog was abnormal. Use a random intercept and a random slope (on abnormalities) in each site. How do abnormalities in a frog affect snout-to-vent length? Does this effect vary across sites?

2. Acknowledgements

Cite resources or individuals helping you.