[R] Regression problem

From: Angila Albaros <angilaros_at_gmail.com>
Date: Tue, 15 Jul 2008 14:02:15 +0200


Hello all,

                  I am new to r programmeand need help. I want to do
multiple linear regression analysis. say, I have two matrix 'x' and 'y'. I want, 'x' as my response variable and 'y' as predictor. Each time one column of 'x' will be the response, say x[,1], then next x[,2] and so on. And also I need to store the coefficients in a matrix form. Please help me.

> x

     [,1] [,2] [,3] [,4]
[1,] -1 0 0 0
[2,] 0 -1 0 0
[3,] 0 0 -1 0
[4,] 0 0 0 -1

> y

           [,1] [,2] [,3] [,4]
[1,] 0.6748156 0.266461216 -0.6883143 2.1332456
[2,] 0.5668101 0.295578807 0.1743760 0.4730689
[3,] -2.9465207 -2.313246341 -0.6060058 0.6236515
[4,] -1.5882276 0.002852312 -1.3152300 0.9082773
>

Thanks in advance
Angila A.

        [[alternative HTML version deleted]]



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. Received on Tue 15 Jul 2008 - 15:19:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jul 2008 - 16:31:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive