Re: [S] comparing spline fits with different df?

Martin Maechler (
Thu, 9 Apr 1998 08:16:28 +0200

>>>>> "Bill" == Bill Shipley <> writes:

Bill> Hello, I know that there are a number of different methods that
Bill> have been suggested to choose the "best" span value, or smoother
Bill> df, when using spline smoothers. However, I would like to know
Bill> if there is any way of testing whether or not a spline fit with x
Bill> df provides a significantly better fit than a spline fit with y
Bill> df? In other words, assuming normality and homogeneity of
Bill> variance for the residuals, what is the sampling distribution of
Bill> the smoother cross-validation score?

The easiest is to use the (Cp based ?) test provided by

g1 <- gam(y ~ s(x), ...., df = df1)
g2 <- gam(y ~ s(x), ...., df = df2)


Of course, it can be discussed how exactly the nonparametric
degrees of freedom should be counted, and related questions..

Martin Maechler <> <><
Seminar fuer Statistik, ETH-Zentrum SOL G1; Sonneggstr.33
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1086
This message was distributed by To unsubscribe
send e-mail to with the BODY of the
message: unsubscribe s-news