[R] lm

Oscar Bayona
2009-06-25T09:46:38Z

Hi all,

I want to make multiple least squares estimation on two matrix (without
intercept)

imagine matrix "a" and matrix "b", I want to
"regress" each colum on matrix
"a" (dependent variable) on each column of matrix b, I mean, regress
first
colum on a to first column on b. Second column on a to second column on b.

Imagine "a" and "b" have 200 columns. So I will have 200
estimated
coefficients.

Why this doesn´´ t function?


zza2<-function(){

a<-read.table("a.txt")
b<-read.table("b.txt")

mrp <-lm(as.matrix(cbind(a)) ~ 0+as.matrix(cbind(b)))
mr22p<-coefficients(mrp)

plot(mr22p)

	[[alternative HTML version deleted]]