Dear list, I have read several posts on this topic. I would use the same methodology as proposed by Simon Wood in this post:
http://r.789695.n4.nabble.com/variance-explained-by-each-term-in-a-GAM-td836513.html My first question is: Does anyone know a scientific source (paper, book,...) that explains or uses this methodology. I have read several articles, particularly in the field of ecology, that use GAM and I've never read one that dealt with the proportionof variance explained by each term of a model... and I think it's an important topic, at least for my study! My second question: if I supplied an offset to gam as an argument, should I use it in the full, reduced and null models, like I did in this example adapted from the previous post from Simon Wood. I guess so... ## fit full and reduced models... b <- gam(y~offset(x)+s(x1)+s(x2)) b1 <- gam(y~offset(x)+s(x1),sp=b$sp[ 1]) b2 <- gam(y~offset(x)+s(x2),sp=b$sp[2]) b0 <- gam(y~offset(x)+1) ## calculate proportions deviance explained... dev_x2 <-(deviance(b1)-deviance(b))/deviance(b0) ## prop explained by s(x2) dev_x1 <-(deviance(b2)-deviance(b))/deviance(b0) ## prop explained by s(x1) for example, if dev_x2 = 0.4 and dev_x1 =0.1, is the remaining 0.5 corresponds to the proportion of variance explained by the interaction between the two terms? Thanks in advance, Sam [[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.