0

I want to use a power function on the classic surface area to volume relationship.

surfaceArea<-c(6,24,54)
volume<-c(1,8,27)

Logging the data works to get the parameter values of the linear function as follows

logSurfaceArea<-log10(surfaceArea)
logVolume<-log10(volume)

plot(logSurfaceArea~logVolume, pch =16)
allometryModel <-lm(logSurfaceArea~logVolume)
summary(allometryModel)

But how do I get the parameter values for the original power function?

adkane
  • 1,429
  • 14
  • 29
  • You start from a model in which `S = k * V^alpha`, then take the `log` and you get `logS = log k + alpha*log V`. This is the linear model you evaluated in the `allometryModel` object. As you can see the intercept is `log k` so `k = exp(intercept)`. The `alpha` coefficient is the `logVolume` coefficient. – nicola Feb 17 '16 at 11:50

1 Answers1

1

One way to do it is to use mathematical way of thinking. Let's say y is surfaceArea and x is volume, then what you are fitting with the lm function is this:

log10(y) = a*log10(x) + b,

then

y = 10^(a * log10(x) + b) = 10^(a * log10(x)) * 10^b = (10^(log10(x)))^a * 10^b = x^a * 10^b

you can check it plotting these plots:

 plot(volume, volume^allometryModel$coeff[2]*10.0^allometryModel$coeff[1], col="red")
 plot(volume, surfaceArea)

Please note, that you need to propagate properly the errors if you would like to use the coefficient errors provided by the lm function.

Nadia
  • 21
  • 2
  • So it's quite a roundabout way to get the power law function plotted. Could I set it up so that I could extract the coefficients from that model? – adkane Feb 17 '16 at 15:43