[R] mgcv, gam

kjetil brinchmann halvorsen kjetil at entelnet.bo
Thu Jan 30 15:06:05 CET 2003


Hola!

I have some problems with gam in mgcv. Firts a detail: it would
be nice igf gam would accept an na.action argument, but that not the 
main point.

I want to have a smooth term for time over a year, the same pattern 
repeating in succesive years. It would be natural then to impose 
the condition s(0)=s(12). Is this possible within mgcv?

I tried to obtain this with trigonometric terms, aca:

> Rot.gam2 <- gam(cbind(Rotavirus,Total)~ s( I(sin((MesN/12)*2*pi)), 
bs="cr" )+
+                    s( I(cos((MesN/12)*2*pi)), bs="cr" ), 
data=na.omit(Rot), 
+                    family=binomial)
Warning messages: 
1: Termwise estimate degrees of freedom are unreliable 

but this does not seem to be wholy satisfactory. Especially, the 
result of plot.gam shows smooths with confidence bounds 
which cannot be discriminated visually from the smooth itself!, 
and the warning messages about unreliable estimated
degrees of freedom. 

I would be happy if you could comment some
about this.

Thanks, 

Kjetil Halvorsen




More information about the R-help mailing list