[R] Help with gam

Zsolt Macskasi
Wed, 11 May 2011 15:22:09 -0000

Hi,

I am a brand new user of R and I am trying to use the gam procedure with the
package mgcv. I did a bit of my homework by consulting the R-manual, as well as
the mgcv manual written by Simon Wood. I admit it was just a few hours, but what
I am trying to do is really basic. Essentially, what I am trying to do is to
generate the fitted values after the execution of the gam procedure and export
them into Excel.

Here is my program:

ABC <- read.table("Incidence Data.csv", header=TRUE,
sep=",")
incidence <- ABC[,1]
age <- ABC[,2]
birthyear <- ABC[,3]
fit<-gam(incidence~te(age,birthyear), family=poisson, fit=TRUE)

All this works. Now, how can I see the fitted values and copy them back to
Excel?

Thank you very much,

Zsolt

	[[alternative HTML version deleted]]