[R] prediction using gam

2007-08-08 Thread Johnson, Elizabeth
I am fitting a two dimensional smoother in gam, say junk = gam(y~s(x1,x2)), to a response variable y that is always positive and pretty well behaved, both x1 and x2 are contained within [0,1]. I then create a new dataset for prediction with values of (x1,x2) within the range of the original

Re: [R] prediction using gam

2007-08-08 Thread Simon Wood
Without seeing the data and results it's hard to say. mgcv::predict.gam is already `safe' so that's not the issue. It's also pretty heavily tested, so a problem with that function wouldn't be the first place I'd look. How `large positive' are the predictions relative to the observed response?

Fwd: Re: [R] Prediction using GAM

2005-03-25 Thread Kerry Bush
Note: forwarded message attached. __ ---BeginMessage--- Subject: Re: [R] Prediction using GAM To: Prof Brian Ripley [EMAIL PROTECTED] In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 1068

Re: [R] Prediction using GAM

2005-03-24 Thread Prof Brian Ripley
R has *two* gam() functions in contributed packages 'mgcv' and 'gam'. Which is this? Please see the posting guide and provide a reproducible example. If this is package 'gam', prediction difficulties of this sort for the S version are discussed in the White Book, MASS and elsewhere (but I

[R] Prediction using GAM

2005-03-23 Thread Kerry Bush
Recently I was using GAM and couldn't help noticing the following incoherence in prediction: 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]))