Nathan you wrote:

>It looks like the R code first applies a 12-month smoothing filter to the data before computing differences. That is, the value for each month is replaced by the average of that month, the preceding 5 months, and the following 6 months.

and

>filter is a built-in R function to do weighted smoothing; here the weights are uniform (1/wfl, wfl=12) over a 12-month window.

I interpreted "the value for each month is replaced by the average of that month" as the typo-corrected sentence:

"the values for each month are replaced by the average of the values of that month", because if there is no typo then what should be the "average of a month" in this context??

So this would mean I sum over the values in a month and divide by the number of values. But then what does this built in "filter" in this r-code?

It sounds as if it takes the 12 averages of the 12 months, sums them up and divides them by 12. Yes, no?

I think there should be a formula in the articles. The result should also be reproducable with other software than this r-code and this means in particular without the need to "reverse engineer" the formula from the r-code. I mean from what I understood sofar - we are talking here about sums and differences and may be taking some fractions of a set of real values. It looks to me as if one should be able to do this with any simple calculator or even by hand, but I may of course oversee something.

I couldn't make sense of Renato Iturriaga's graphs, as I couldnt find anywhere a readable description of how he derived them.

>It looks like the R code first applies a 12-month smoothing filter to the data before computing differences. That is, the value for each month is replaced by the average of that month, the preceding 5 months, and the following 6 months.

and

>filter is a built-in R function to do weighted smoothing; here the weights are uniform (1/wfl, wfl=12) over a 12-month window.

I interpreted "the value for each month is replaced by the average of that month" as the typo-corrected sentence:

"the values for each month are replaced by the average of the values of that month", because if there is no typo then what should be the "average of a month" in this context??

So this would mean I sum over the values in a month and divide by the number of values. But then what does this built in "filter" in this r-code?

It sounds as if it takes the 12 averages of the 12 months, sums them up and divides them by 12. Yes, no?

I think there should be a formula in the articles. The result should also be reproducable with other software than this r-code and this means in particular without the need to "reverse engineer" the formula from the r-code. I mean from what I understood sofar - we are talking here about sums and differences and may be taking some fractions of a set of real values. It looks to me as if one should be able to do this with any simple calculator or even by hand, but I may of course oversee something.

I couldn't make sense of Renato Iturriaga's graphs, as I couldnt find anywhere a readable description of how he derived them.