Hi,
I'm working with gamm models of this sort:
gm<- gamm(Z~te(x,y),data=DATA,random=list(Group=~1))
gm1<-gamm(Z~te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1))
with a dataset of about 70000 rows and 110 levels for Group

if I use plot(gm1$gam), I obtain 3 different surface plots, one for each level 
of my factor but I would like to create more complex contour plots for those 3 
graphics and thus tried using function vis.gam(type="contour").
It works well if I use vis.gam on the first model vis.gam(gm$gam) but I get an 
error message if I try to use it with my second model vis.gam(gm1$gam)

vis.gam(gm1$gam,plot.type="contour",n.grid=200,color="heat",zlim=c(0,4))
Error in predict.gam(x, newdata = newd, se.fit = TRUE, type = type) :  number 
of items to replace is not a multiple of replacement length

I'm quite sure this is because I try to obtain 3 graphs out of a routine made 
to produce only one but I can't find a way to  solve the problem (searching the 
archives, checking plot.gam(), vis.gam(), etc)
Thanks if anyone can help,
Geraldine

        [[alternative HTML version deleted]]

______________________________________________
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