Fwd: Re: [R] Prediction using GAM

From: Kerry Bush <kerryrekky_at_yahoo.com>
Date: Sat 26 Mar 2005 - 06:25:55 EST

Note: forwarded message attached.


attached mail follows:


Subject: Re: [R] Prediction using GAM
To: Prof Brian Ripley <ripley@stats.ox.ac.uk> In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii Content-Length: 1068

  The example I used is exactly in the R help file of predict.gam in the package 'gam'.

  You may reproduce this example by using the following code:

library(gam)
data(gam.data)
data(gam.newdata)
gam.object <- gam(y ~ s(x,6) + z, data=gam.data) predict(gam.object)[1]

      1
0.8017407
predict(gam.object,data.frame(x=gam.data$x[1],z=gam.data$z[1]))

       1
0.1668452



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Mar 26 06:30:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:56 EST