The data file below contains data about the average mass (in grams) and the average basal metabolic rate (BMR) measured in watts for 315 different species of mammals.
mammals = read.csv("http://people.hsc.edu/faculty-staff/blins/StatsExamples/KleibersLaw.csv")
head(mammals)
## Species Class Mass BMR
## 1 Acinonyx jubatus Mammalia 46500.00 61.77
## 2 Acomys russatus Mammalia 45.00 0.24
## 3 Acrobates pygmaeus Mammalia 13.00 0.08
## 4 Aepyprymnus rufescens Mammalia 2.48 5.98
## 5 Ailurus fulgens Mammalia 4950.00 4.90
## 6 Alouatta palliata Mammalia 6000.00 11.46
myLM = lm(BMR~Mass,data=mammals)
plot(mammals$Mass,mammals$BMR,ylab='Average BMR (Watts)',xlab="Average Mass (g)")
abline(myLM)
Try log-transforming one or both of the x and y-variables. Which tranformation produces the best pictures?
Find the trasformed least squares regression line.
Check the residuals to see if they have roughly constant variance and following a normal distribution.
Make a confidence interval for the BMR of a species with an average body mass of 4,000 grams. What are you 95% sure that your confidence interval contains?
Use pencil and paper to convert the log-transformed linear model to the appropriate nonlinear model, and describe whether it is an exponential, logarithmic, or power law model.
Do your results fit with Kleiber’s law?