[18786] in s-news-athena
Re: [S] gam prediction
daemon@ATHENA.MIT.EDU (Xu Fan)
Thu Jul 29 13:10:19 1999
Date: Thu, 29 Jul 1999 13:04:54 -0400 (EDT)
From: Xu Fan <fan@stat.cmu.edu>
To: s-news@wubios.wustl.edu
In-Reply-To: <Pine.HPP.4.10.9907291223571.5732-100000@sloth.stat.cmu.edu>
Message-Id: <Pine.HPP.4.10.9907291302480.5840-100000@sloth.stat.cmu.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Got the reason: "data=" should be "newdata=". Or simply delete "data=".
Thanks.
On Thu, 29 Jul 1999, Xu Fan wrote:
>
> 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
>
-----------------------------------------------------------------------
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