[R] multivariate analysis
Kjetil Halvorsen
kjetilbrinchmannhalvorsen at gmail.com
Sat Nov 27 18:39:11 CET 2010
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.Garcia at 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 at 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.
>
More information about the R-help
mailing list