InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Search this site

 

 

Just a note

Notice that, although a 5 point running mean (n=5) has 4 fewer means than there are observations (loosing two at each end of the graph), a 9 point running mean (n=9) looses 8 points (4 at each end of the graph).

An alternative approach is to calculate 'consecutive' running means - in other words, running means of running means. The last graph of this set shows the result of calculating three consecutive 3-point running means - in other words, a 3 point running mean, of a 3 point running mean, of a 3 point running mean. Aside from the quality of smoothing, notice that consecutive running means tend to loose fewer points at each end (in this case a total of 6, compared to 8 for the 9 point running mean).

In this case, either the 5-point running mean (n=5) or the three consecutive 3-point running means provide a reasonable smoothing of the data - without loosing too much information on trends.

R calculated and plotted a running mean from a set of data (such as the butterfly data) using these instructions: