Skip to content

MGCV: Degrees of freedom of smooth terms

2 messages · Christoph Scherber, Gavin Simpson

#
Dear all,

This is just a quick question regarding degrees of freedom in GAM models fit by MGCV (using select=T):

Can I roughly interpret them as:

1 df: linear effect of x on y
2 df: approximately quadratic of x on y
3 df: approximately cubic effect of x on y?
1 df for a spatial term s(x,y): bilinear effect (?) or how would I call this?

And what does "ref.df" in the summary output mean; is this the unpenalized degrees of freedom for
each term?

Thank you very much for answering!

Best wishes,
Christoph
2 days later
#
On Tue, 2013-07-23 at 11:16 +0200, Christoph Scherber wrote:
Yes, approximately
A bilinear effect would have two df, no? In a linear regression z ~ x +
y would define a plane just like s(x, y) can and would use 2 df. 1 df
for the entire s(x,y) implies an additional penalty such that less than
1df is spent in the `x` or `y` dimensions of the spline.
IIRC, these are the dfs that are used in the tests reported. I am not
familiar enough with the details to comment more. If you turn on Select
= TRUE for example which adds an additional penalty then the ref.df can
be much larger than the edf values.

You might send an email to Simon Wood (or see if he picks up on this)
for a (far) more authoritative answer on this part of your question.

HTH

G