if you want linear models (not specified), something like this should work:
Put your 1800 response variables (as columns) in a nx1800 matrix resp_mat, and then lm(resp_mat ~ latitude*age) # interactions lm(resp_mat ~ latitude+age # without interactions Kjetil On Fri, Nov 26, 2010 at 9:01 PM, Rosario Garcia Gil <m.rosario.gar...@genfys.slu.se> wrote: > > > Hi > > I have 1800 response variables to regress on two factors (latitude and age), > what is the script to run all response variables at once instead of writing > 1800 models? > > Thanks > R. > > ______________________________________________ > 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. > ______________________________________________ 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.