# Assignment instructions

## General notes on assignment:

Hand in your assignment as a pdf via Moodle. Your assignment should include written responses to all of the assignment answers, as well as any figures or tables necessary to explain your results. All figures and tables should be accompanied by figure captions; the standard rule is that a figure caption should be able to fully explain what a figure is showing without the reader having to refer to the rest of the text. If you are unsure of what a caption should look like, read https://www.internationalscienceediting.com/how-to-write-a-figure-caption/.

You should also submit an R script (saved as a text file with the .R extension) capable of recreating all of the results you mentioned in your report, including comments on what different parts of the code are written to accomplish.

Your assignment should also include references to any scientific papers cited, including the papers I’ve asked you to discuss in the assignment, and any references you find outside of these papers. Remember, part of academic honesty is citing where you get specific ideas from. The Concordia library has a good guide on how to cite papers: library.concordia.ca/learn/citing/getting-it-right/. Make sure to use the APA citation format.

This assignment is designed to have you work through the basic steps of a statistical analysis: data description, visualization, modelling and assumption checking, reporting findings, and using those findings to evaluate scientific hypotheses.

## Step 1: Describing data collection

The data set you will be using in this assignment is a subset of the data used in the paper White and Seymour (2003). A pdf of this paper is included in the assignment folder.In your own words, *briefly* summarize the method the authors used to collect the data on body mass and BMI, including any criteria they used for including or excluding specific data. Make sure to include a reference to the paper, using the APA citation format. You do not need to summarize the rest of the methods in the paper, only the methods the authors used for collecting the data. Note that the phrase “from the literature” means the authors looked for the values in already-published papers.

## Step 2: visualizing the data

Create scatter plots of Basal metabolic rate (`BMR`

) vs. body mass (`mass_g`

), and a second scatterplot of the log-transformed versions of both variables (`BMR_log10`

and `mass_log10`

). Make sure to label axes appropriately with units and include figure captions. Remember that the log-transformed versions of the two variables are *unitless*.

## Step 3: model fitting and evaluating model assumptions

Fit a linear regression of log-transformed basal metabolic rate on log-transformed biomass:

`BMR_slope_model <- lm(BMR_log10 ~ 1 + mass_log10, data = bmr_mass_data)`

Illustrate this linear model by adding the estimated regression line to the scatterplot of the data.

Using the residuals from this model and what you know about regression model assumptions, answer the following questions:

- What assumptions are we making when using the
`BMR_slope_model`

to predict average carnivore basal metabolic rates at a given mass? - Plot a graph of model residuals versus fitted values from the model, and a qq-plot of model residuals. Based on evidence from these plots, explain whether the assumption of linearity, equal variance, and normally distributed residuals are reasonable for this model (see tutorial 11 for how to create these plots).

## Step 4: using statistical results to evaluate scientific hypotheses

Using the linear model from step 3, answer the following questions:

- Report the sample size, the degrees of freedom, residual standard error, and multiple R-squared value from the fitted model. Briefly explain what the residual standard error and R-squared values tells you about the effectiveness of the fitted model at predicting BMR in carnivora.
- Report the estimated slope and intercept of the regression line and the 95% and 99% confidence intervals for these two parameters. You should report the estimate, standard error, and degrees of freedom used to calculate these intervals. Make sure to round appropriately, using the standard errors of the coefficients as a guide.

## Step 5: use statistical results to make scientific inferences

Explain whether the results from your model are consistent with any of the three theoretical predictions, based on the two confidence intervals. The predicted slopes for the three models are: