Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL: http://people.bath.ac.uk/sw283/mgcv/) shows a general equation log{E(yi )} = α+ ßxi + f (zi ) . What I would like to do is put my model coefficients and present the equation used. I am an ecologist not a statistician - and have no access to statistical advice. How would I use values from the model below to complete the equation: log{E(yi )} = α+ ßxi + f (zi )? Many thanks, Darren
## from the help library(mgcv) set.seed(0) ## simulate some data... dat <- gamSim(1,n=400,dist="normal",scale=2) b<-gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat) summary(b) I have tried searching help forum with "gam equation" I was not able to find an answer from the 18 threads returned. Also tried looking at "?predict.gam" and simply "predict.gam" however my understanding of R is not sufficient to understand the details to be able to answer my question. I checked Simon Woods excellent presentations (http://www.maths.bath.ac.uk/~sw283/) however if the answer is there I am too stupid to see it. In truth the content assumes a level of basic understanding that I don't have. Unfortunately I do not have access to the book ( Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.) or finances necessary to get it. Any help would be much appreciated, R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] mgcv_1.6-1 loaded via a namespace (and not attached): [1] grid_2.10.1 lattice_0.17-26 Matrix_0.999375-33 nlme_3.1-96 -- View this message in context: http://n4.nabble.com/which-coefficients-for-a-gam-mgcv-model-equation-tp1578925p1578925.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.