See ?predict.gam

You create a data frame (e.g. `dat2011') containing the 2011 values for RH, solar, windspeed and transport, then

predict(cod,dat2011,type="response")

there are various options for type -- see ?predict.gam



On 09/28/2011 10:10 AM, pigpigmeow wrote:
For example:
GAMs and after stepwise regression:
cod<-gam(newCO~RH+s(solar,bs="cr")+windspeed+s(transport,bs="cr"),family=gaussian
(link=log),groupD,methods=REML)

I used 10 year meterorology data (2000-2010) to form equation of
concentration of carbon monoxide.
NOW, I have 2011 meteorology data, I want to use the above GAMs to get the
predict value of concentration of carbon monoxide.

How can I put the 2011 data into this gam and get the expected value of
concentration of Carbon monoxide??


--
View this message in context: 
http://r.789695.n4.nabble.com/GAMs-in-R-How-to-put-the-new-data-into-the-model-tp3849851p3850473.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to