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]]
______________________________________________ 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.