s-news
[Top] [All Lists]

Re: [S] gam prediction

To: s-news@wubios.wustl.edu
Subject: Re: [S] gam prediction
From: Xu Fan <fan@stat.cmu.edu>
Date: Thu, 29 Jul 1999 13:04:54 -0400 (EDT)
In-reply-to: <Pine.HPP.4.10.9907291223571.5732-100000@sloth.stat.cmu.edu>
Sender: owner-s-news@wubios.wustl.edu
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

<Prev in Thread] Current Thread [Next in Thread>