s-news
[Top] [All Lists]

[S] degrees of freedom in GAM

To: s-news@wubios.wustl.edu
Subject: [S] degrees of freedom in GAM
From: Tamara Shatar <t.shatar@agec.usyd.edu.au>
Date: Tue, 01 Feb 2000 10:21:54 +1100
Sender: owner-s-news@wubios.wustl.edu
I have been trying to create GAMs, using cubic smoothing splines with
various degrees of freedom.  If I specify the degrees of freedom simply
using a number from the keyboard, all is well.  However, when I try to
specify the df by using an object instead, the model seems to be created
alright but predict.gam() doesn't work.  A safe.predict error is returned.

e.g.  This works:

model<-gam(y~s(x,3), data=data)
predict.gam(model, newdata=newdata)


This doesn't work:

i<-3
model<-gam(y~s(x,i), data=data)
predict.gam(model, newdata=newdata)


Any ideas?

Thanks in advance,

Tamara.



Tamara Shatar
Department of Agricultural Chemistry and Soil Science
Ross St Building A03
The University of Sydney 
NSW 2006
Australia.
phone: +61 2 9351 7457
fax : +61 2 9351 3706
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] degrees of freedom in GAM, Tamara Shatar <=