Why Study Body Size and Metabolism?

  • Larger animals burn more total energy but less energy per unit of body mass
  • This pattern, first described by Max Kleiber (1932), holds remarkably well across the animal kingdom, from shrews to elephants
  • Understanding it requires more than biology it requires statistical modeling
  • Today we’ll use simple linear regression to estimate and test this relationship

Kleiber’s “Law”

Basal metabolic rate (BMR) is often modeled as a power law function of body mass \(W\):

\[ BMR = a \cdot W^{b} \]

  • Empirically, \(b \approx 0.75\) — the famous “3/4-power law”
  • \(a\) is a constant that depends on the taxonomic group and units used
  • Because this is a power law, it becomes linear after a log transform which is exactly what simple linear regression needs

From Power Law to Linear Model

Taking the natural log of both sides of \(BMR = a \cdot W^b\):

\[ \log(BMR) = \log(a) + b\,\log(W) + \varepsilon \]

This is precisely a simple linear regression model:

\[ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i, \qquad \varepsilon_i \sim N(0, \sigma^2) \]

where \(Y_i = \log(BMR_i)\), \(X_i = \log(W_i)\), and \(\beta_1\) is our estimate of the scaling exponent \(b\).

Simulating Data and Fitting the Model

set.seed(2024)
n <- 60
body_mass_kg <- exp(runif(n, log(0.02), log(6000)))   # shrew to elephant
beta0_true <- log(70); beta1_true <- 0.75
log_bmr <- beta0_true + beta1_true * log(body_mass_kg) + rnorm(n, 0, 0.2)
bmr_kcal_day <- exp(log_bmr)
species_data <- data.frame(body_mass_kg, bmr_kcal_day)

model <- lm(log(bmr_kcal_day) ~ log(body_mass_kg), data = species_data)
coef(model)
##       (Intercept) log(body_mass_kg) 
##         4.2582273         0.7493465

Visualizing the Scaling Relationship

Checking the Model: Residuals

Metabolic Rate vs. Body Mass (via plotly)

Hypothesis Testing: Is There a Real Relationship?

We test whether body mass truly predicts metabolic rate:

\[ H_0: \beta_1 = 0 \qquad \text{vs.} \qquad H_a: \beta_1 \neq 0 \]

with test statistic

\[ t = \frac{\hat\beta_1 - 0}{SE(\hat\beta_1)} \ \sim\ t_{n-2} \ \text{ under } H_0 \]

summary(model)$coefficients
##                    Estimate  Std. Error  t value     Pr(>|t|)
## (Intercept)       4.2582273 0.029915293 142.3428 1.693950e-75
## log(body_mass_kg) 0.7493465 0.006659608 112.5211 1.347686e-69
  • The p-value for \(\hat\beta_1\) is essentially 0, so we reject \(H_0\)
  • Strong evidence that body mass is a statistically significant predictor of BMR

A more biologically interesting question: is the scaling exponent consistent with Kleiber’s theoretical value of \(0.75\)?

\[ H_0: \beta_1 = 0.75 \qquad \text{vs.} \qquad H_a: \beta_1 \neq 0.75 \]

beta1_hat <- coef(model)[2]
se_beta1 <- summary(model)$coefficients[2, "Std. Error"]
t_stat_kleiber <- (beta1_hat - 0.75) / se_beta1
p_value_kleiber <- 2 * pt(-abs(t_stat_kleiber), df = model$df.residual)
c(t_stat = t_stat_kleiber, p_value = p_value_kleiber)
##  t_stat.log(body_mass_kg) p_value.log(body_mass_kg) 
##               -0.09813101                0.92216661
  • A large p-value here would mean our estimate is consistent with the 0.75 exponent a very different (and more useful) conclusion than testing against zero

Point and Interval Estimates

coef(model)                    # point estimates
##       (Intercept) log(body_mass_kg) 
##         4.2582273         0.7493465
confint(model, level = 0.95)   # 95% confidence intervals
##                       2.5 %    97.5 %
## (Intercept)       4.1983454 4.3181093
## log(body_mass_kg) 0.7360158 0.7626771
  • Point estimate: \(\hat\beta_1 \approx\) 0.749, close to the theoretical value of 0.75
  • The 95% confidence interval gives a range of plausible values for the true scaling exponent
  • A narrow interval reflects a precise estimate; a wide one reflects more uncertainty

Takeaways

  • Log-transforming a power-law relationship turns it into a simple linear regression problem
  • We obtained point estimates and confidence intervals for the scaling exponent, and tested \(H_0: \beta_1 = 0\)
  • Both the p-value and the confidence interval point to a strong, real relationship between mass and metabolism
  • The same toolkit regression, hypothesis testing, confidence intervals generalizes far beyond biology