The Robbins and colleagues paper (2010) has an extremely detailed description of the intended use of their mass estimation formulae. One particular note became an unexpected challenge when I was adding their method to Anthropomotron.
There are different formulae to use depending on the estimated age of the individual. Each formulae is tied to one whole number year (e.g. 1, 2) plus or minus 6 months. To decide which formula to use at the 6 month split, the researchers wrote:
“Results are intended to apply to individuals at [plus or minus] 6 months from these ages, e.g., the 1-year-old formula applies to individuals 6 months to 17.59 months,” (Robbins et al., 2010:147).
This is my solution, which is a great exercise in thinking like a computer. The first step is to handle the fact that I use years in Anthropomotron while the paper describes its methods in terms of months. Then I need to apply the special rounding rule using an if-then statement: if the decimal portion is less than 0.59 months, then round down, else round up. I tried a variety of techniques to convert years in decimals into months, but I decided that the easiest way would be to convert the 0.59 months into years instead. A quick calculation that 0.466 years is roughly equivalent to 5.59 months (the halfway mark in the year when the rounding rule changes).