Hi there, I'm working on a biological dataset that contains up to 40 species and 100 sites each. The response variable is index (trend), dependent is year - each combination has an index for each year between 1994 and 2008 inclusive. So my input file is along the following lines: species, site, year, index. I'd like to run a GAM, and plot smoothing spline 5df, poisson, and output the fitted values for each species/ site combination. I have written the code for the GAM and for outputting the fitted values, which is very simple and brief (<5 lines) but am unsure how to repeat the process for each combination. Would be grateful if someone could advise on this code, including producing fitted values for each. Thanks, Olivia -- View this message in context: http://r.789695.n4.nabble.com/repeating-a-GAM-across-many-factors-tp2993522p2993522.html Sent from the R help mailing list archive at Nabble.com.