Re: [R] Linear regression equation and coefficient matrix

2010-08-19 Thread ashz
Dear Greg, Thanks for the tip. As I am new in R can you please provide me a script how do to so. It will help my learning process. Thanks, Asher -- View this message in context: http://r.789695.n4.nabble.com/Linear-regression-equation-and-coefficient-matrix-tp2329804p2330867.html Sent from

Re: [R] Linear regression equation and coefficient matrix

2010-08-19 Thread Greg Snow
] On Behalf Of ashz Sent: Thursday, August 19, 2010 3:02 AM To: r-help@r-project.org Subject: Re: [R] Linear regression equation and coefficient matrix Dear Greg, Thanks for the tip. As I am new in R can you please provide me a script how do to so. It will help my learning process. Thanks

[R] Linear regression equation and coefficient matrix

2010-08-18 Thread ashz
Hi, I have 20*60 data matrix (with some NAs) and I wish to perfom a Pearson correlation coefficient matrix as well as simple linear regression equation and coefficient of determination (R2) for every possible combination. Any tip/idea/library/script how do to so. Thanks, As hz -- View

Re: [R] Linear regression equation and coefficient matrix

2010-08-18 Thread Joshua Wiley
On Wed, Aug 18, 2010 at 6:09 AM, ashz a...@walla.co.il wrote: Hi, I have 20*60 data matrix (with some NAs) and I wish to perfom a  Pearson correlation coefficient matrix as well as simple linear regression equation The correlation matrix can be readily obtained by calling cor() on the entire

Re: [R] Linear regression equation and coefficient matrix

2010-08-18 Thread Joshua Wiley
Hmm, after reading one of your other posts, I am thinking you may *just* want all pairwise combinations. This worked for me: # Create a sample data frame with 60 named columns x - data.frame(matrix(rnorm(1200), ncol = 60, dimnames = list(NULL, paste(Col, 1:60, sep='' # calculate the

Re: [R] Linear regression equation and coefficient matrix

2010-08-18 Thread ashz
Hi, Thanks, the cor() works. Regarding the simple linear regression equation (mainly, the slope parameter) and r2. I think I was not writing it well. I need to do it just for the columns. If I have a, b, c, d columns I wish to compute the relation of there data, e.g., between a-b, a-c, a-d,

Re: [R] Linear regression equation and coefficient matrix

2010-08-18 Thread Greg Snow
: Wednesday, August 18, 2010 8:43 AM To: r-help@r-project.org Subject: Re: [R] Linear regression equation and coefficient matrix Hi, Thanks, the cor() works. Regarding the simple linear regression equation (mainly, the slope parameter) and r2. I think I was not writing it well. I need to do