[18784] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] gam prediction

daemon@ATHENA.MIT.EDU (Xu Fan)
Thu Jul 29 12:37:06 1999

Date: Thu, 29 Jul 1999 12:31:12 -0400 (EDT)
From: Xu Fan <fan@stat.cmu.edu>
To: s-news@wubios.wustl.edu
Message-Id: <Pine.HPP.4.10.9907291223571.5732-100000@sloth.stat.cmu.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I encountered some surprises when using  fitted gam object to
predict based on new regressor values. It might be due to some simple
grammar mistakes.

mod <- gam(ozone^(1/3) ~ lo(radiation) + lo(wind, temperature), data =
air)

newdata <- data.frame(ozone=4,radiation=200,temperature=70,wind=8)
predict.gam(mod,data=newdata)
  # why do I get 111 outputs? I expect a single output corresponding to
  # the new regressors feeded.

predict.gam(mod, data=air[1,])
  # still 111 outputs.

-----------------------------------------------------------------------
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

home help back first fref pref prev next nref lref last post