Skip to content
Prev 25676 / 398502 Next

Pspline smoothing

On Mon, 25 Nov 2002, Martin Renner wrote:

            
time <- 1:100
x <- rnorm(100)
traj.spl <- smooth.Pspline(time, x, norder=3 )

works for me.  It's probably something specific to your data.  However,
the defaults spar=0, method=1 are not sensible: they are asking for
a perfect fit. At least try method=3.
?smooth.Pspline does not have argument cv listed for smooth.Pspline,
so no wonder it does not work.
That's *length* 1, not value 1. It's also sm.spline not smooth.Pspline.

I suspect that if you read the help page accurately you can find ways
to do what you want.  I suggest starting with the defualt settings of
sm.spline until you understand those of smooth.Pspline.