[Rd] documentation for filter() (PR#8010)

sego@vt.edu sego at vt.edu
Fri Jul 15 18:12:04 CEST 2005

Full_Name: Landon Sego
Version: 2.1.1
OS: Windows
Submission from: (NULL) (

In the Details section of the documentation for filter(), it says:

 The convolution filter is

             'y[i] = f[1]*x[i+o] + ... + f[p]*x[i+o-p-1]'

Correct me if I'm wrong, but I think it should be:

             'y[i] = f[1]*x[i+o] + ... + f[p]*x[i+o-p+1]'

For example:  consider a 2 sided convolution with a filter that has length p=3
and the filter is applied to the i=6th observation.  In this case, o=1. Then we
would have

             'y[6] = f[1]*x[6+1] + f[2]*x[6+1-1] + f[3]*x[6+1-3+1]'
                   = f[1]*x[7] + f[2]*x[6] + f[3]*x[5]'

More information about the R-devel mailing list