On Thu, 2009-09-10 at 14:58 +0100, Corrado wrote: > Dear R list, > > is it possible to force the intercept to assume the value of 0 (that is no > intercept) in gam from gam package?
Just like you would in lm or glm for example, by adding -1 to your formula. ?gam suggests you look at ?lm to see about the formulas for example. data(airquality) mod0 <- gam(Ozone^(1/3) ~ lo(Solar.R) + lo(Wind, Temp) - 1, data = airquality, na = na.gam.replace) mod1 <- gam(Ozone^(1/3) ~ lo(Solar.R) + lo(Wind, Temp), data = airquality, na = na.gam.replace) summary(mod0) summary(mod1) HTH G > > Regards -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ 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.