Hi everyone,

I have a response matrix (y) and two predictor matrices (x.a, x.b), how
should i proceed if i want to regress y on x.a and x.b column by column?

To be specific, what i want to do is:

y[,1]~x.a[,1]+x.b[,1]
y[,2]~x.a[,2]+x.b[,2]
.
.
.

I have tried lm(y~x1+x2) but it does not work as R treat that as:

y[,1]~x.a[,1]+x.a[,2]+...+x.b[,1]+x.b[,2]+...
.
.
.

Thanks.

Regards,
Fred

	[[alternative HTML version deleted]]

