Skip to content
Prev 176104 / 398503 Next

Help using smooth.spline with zoo object

For equally spaced observations this is quite simple and available in   
various packages
but I like Gabor Grothendieck's version  (which didn't come up  
immediately in my Rseek search:

hpfilter  <-  function(y,lambda=1600)
eye <- diag(length(y))
solve(eye+lambda*crossprod(diff(eye,d=2)),y)}

url:    www.econ.uiuc.edu/~roger                Roger Koenker
email   rkoenker at uiuc.edu                       Department of Economics
vox:    217-333-4558                            University of Illinois
fax:    217-244-6678                            Champaign, IL 61820
On Apr 4, 2009, at 2:19 PM, Rob Denniker wrote: