[19161] in s-news-athena
Re: [S] GAM prediction
daemon@ATHENA.MIT.EDU (Prof Brian D Ripley)
Thu Sep 9 02:54:10 1999
Date: Thu, 9 Sep 1999 07:44:58 +0100 (BST)
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
To: Viswanath Devanarayan <DEVANARAYAN_VISWANATH@lilly.com>
Cc: s-news@wubios.wustl.edu
In-Reply-To: <052567E7.0014C1A2.00@aammta1.d51.lilly.com>
Message-Id: <Pine.GSO.4.05.9909090741300.3933-100000@auk.stats>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 8 Sep 1999, Viswanath Devanarayan wrote:
> When using a GAM model from a training set to predict the test set containing,
> I get the following warning message:
> > predict(Train.gam, newdata=test, type='response')
> 1 2 3 4 5
> 3.997737e-009 0.0004143466 7.94323e-007 2.220446e-016 2.513028e-006
> 6 7 8 9 10
> 8.042191e-013 6.6747e-012 0.0006943088 1.459154e-006 6.915884e-011
> 11 12 13
> 1.185343e-010 0.991457 1.472045e-007
> Warning messages:
> There is a 0% discrepancy between the original and the re-fit used to a
> chieve 'safe' predictions in: safe.predict.gam(object, newdata, type, se.f
> it, terms)
>
>
> I think I am using the correct syntax for predict.gam, and the columns in the
> newdata correspond to the predictors that were used in the GAM model
> for the training set. What does this warning message mean?
I assume this gam model contains a s() or lo() term. Then predict.gam does
not predict the original model (which has too little information on the
smooth terms) but re-fits it to the old and new data combined (White Book
section 7.3.3). The message says the re-fitting made litle difference in
your example.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-----------------------------------------------------------------------
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