The exponential function: a non-linear regression that may be useful to biologists – part 2

If you missed part 1, click here to read

Examples of using the exponential function

We often have the response starting at a high value and declining towards some minimum or “floor” value, perhaps even zero. For example, we might be measuring the nitrogen remaining in pasture urine patches over time. Initially there is rapid evolution of nitrogen until only the base pasture nitrogen is measured. (The data are fabricated, but were “inspired” by data from Jim Crush, ‘Grasslands’, Palmerston North).

alt text

In this case, the expression is

yi = a + bxrx or yi = a + bxe-cx depending on taste.

Where x is zero y = a + b, and x gets larger y gets closer to the asymptote lower level as the bxrx part of the expression gets closer to zero.

 

alt text

Interpreting the parameters

Taking the natural logarithm of r we get 𝑐 = −0.3146 and the SE is

0.0495/0.7301=0.0678.

So the rate of evolution for any day is 0.315 x (𝑦–𝑎) nitrogen units per day, i.e., 0.315 times the amount left between 𝑦 for that day and the “floor” level, 𝑎.

Again we have parameters that are meaningful and a comparison between treatments would involve a comparison between 𝑐 estimates.

In some instances, the floor is zero, so we have

𝑦 = 𝑏 x 𝑒𝑥𝑝( −𝑐𝑥)

that is, we omit the constant, and slope is simply – 𝑐 x 𝑦.

In this instance it is informative to look at the alternative expression:

𝑦 = 𝑏 x 𝑟𝑥.

𝑟 is less than 1, say 0.90 for argument’s sake, and we can see that for each unit increase in 𝑥, 𝑦 decreases by 10%, so for 𝑥 = 0; 𝑦 =𝑏, 𝑥 = 1; 𝑦 = 𝑏 x 0.90, 𝑥 = 2; 𝑦 = 𝑏 x 0.81,𝑥 = 3;𝑦 = 𝑏 x 0.729, etc. so this gives you a pretty good idea of what’s happening – a cubic wouldn’t.

Understanding that this non-linear curve gives you a mechanistic interpretation of the data – the rate of evolution is simply proportional to the amount left to go – which allows you to test this mechanistic interpretation.

What if the population of the soil micro-flora started to change after a time interval? How would this affect the fit of the curve? More to the point: would fitting a polynomial give you the slightest clue that there may be something more there to examine?!

Let’s look at a slightly more complicated case.

Fitting non-linear models

Lysimeters are large drums in which carefully sectioned and removed pieces of soil are placed. Treatments may be simply pouring on water and measuring the out flow, or some might include a fertilizer dressing and the amount lost through soil drainage measured.

As the soil drains, the soil water tension increases causing the outflow of drainage water to decrease. This may be well modelled by an exponential expression similar to soil nitrogen example above except that the end point may be no flow, rather than a steady constant trickle. There may be complications if one brings the soil moisture from PWP (permanent wilting point) to FC (field capacity) and then lets it fall, but let’s assume we start from FC and let it drain. We may get something like this.

alt text

(Again, the data are fabricated, but this time inspiration is due to Trish Fraser, now at ‘Plant and Food’, Lincoln.) Initially, we could fit an exponential decay curve, as for the soil nitrogen example, see that the constant term could be left out and re-fit. We would have something like this.

alt text

Notice that there is a “bump” in the curve. It could be later, but shows up as an area where the curve pauses its downward trend for a time before continuing. There could be some buffering process that releases material once the water tension passes a certain point. Can this be modelled? My approach is to add a term to the expression so we have:

𝑦 =𝑏 x 𝑒𝑥𝑝(−𝑐𝑥)+ℎ x 𝑒𝑥𝑝(−(((𝑥−𝑚)/𝑠)2)).

If you look at the addendum, you may recognise that it looks like part of the formula for the normal probability function. If it works, ℎ will be the height of the bump, 𝑚 will be the middle and 𝑠 a scaling factor to account for the width.

You need to understand a computational difference between fitting linear models and non-linear models. The former almost always involves the inversion of a matrix, which is a straightforward, if long-winded, series of calculations. Fitting the latter requires starting off with some useful guesses about what the parameter estimates might be and then iterating a series of calculations to get better and better estimates with better and better fits until further progress becomes inconsequential. For the usual library of non-linear models, computer programs have built-in routines to get good starting values; otherwise, you often have to supply them yourself. The second thing to consider is that you may have to set the program to iterate more times than its default or make smaller adjustments to the parameter estimates between each cycle. In this case, we used the simple exponential expression to get good guesses for 𝑎, 𝑏 and 𝑐 and guessed 𝑚 from where we thought the bump was on the graph and then guessed that ℎ would be only a unit or two, while 𝑠, being rather like a standard deviation, might be about 1.

alt text

𝑎 is very close to zero: we could remove it. 𝑠 is negative, but insofar as it is squared, sign doesn’t matter. Here’s the final result. (The maximum number of iterations was set to 1000 – default 30.)alt text

The fit is as good as a Savile Row suit. This result would be completely missed if you were fitting a polynomial. However, this just might be a will-o’-the-wisp – we could be getting excited about some chance random effect; perhaps not…

There is a further point I have not illustrated here: the confidence interval lines for the regressions. Those for the polynomial fits are wider, especially at the ends of the graph, than those for the exponential fits. Using RGRAPH [CIPLOT=yes] after each fit gives you the lines, except for fits where the constant is omitted.

Benefits of the exponential curve

In summary, we can see that the exponential curve is a powerful way to analyse some types of biological data. It is often superior to fitting polynomials for several reasons: it’s meaningful, it’s often simpler, it’s often a better fit and it can sometimes lead to unexpected results.

Picture of Dr. Richard Sedcole
Dr. Richard Sedcole
Dr. Richard Sedcole graduated B. Agr. Sc. from Massey University with the intention of returning to the family farm but got distracted by a summer-time technical position at Grasslands Division, of what was then D.S.I.R. (R.I.P.). Recruited as a plant breeder, he completed a M. Agr. Sc. in that subject and subsequently went to Iowa State University at the invitation of Prof. Oscar Kempthorne to complete a joint Ph.D. in statistics and plant breeding. Back in New Zealand he transferred to Applied Mathematics Division, and later accepted an appointment at Lincoln University (then Lincoln College) to lecture in statistics and biometrics. Upon retirement he ran a private practice, but now spends his time on a lifestyle block of hazelnuts, and playing a copy of a 1684 virginal.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Related articles

How much of the variation in your field trial comes from the treatments, and how much comes from...
What should you do when count data are more variable than your model expects? Vanessa Cave and David...
Precision breeding can deliver scientifically impressive traits, but practical value depends on more than technical success. Owen McIntosh...