Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
I think what you have done should be fine. read.table() will return a data frame, which cor() can handle happily. For example: my.data <- read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) # assign your data to "my.data" cor(my.data) # calculate the correlation ma

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Vincent Davis
> > If you read each of your 230,000 variables in separately, you can > combine them into a matrix or dataframe using cbind(variablename1, 2, > etc.). > > HTH, I used read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) to read it in but I could easily only read in th

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
Hello Vincent, The command to correlate two variables and a set is the same (see ?cor). How have you read the data in? If it is a matrix or data frame, you should be able to just use cor(name_of_your_matrix) and it will return the correlation matrix for all variables in your matrix or data frame

Re: [R] correlation coefficient

2009-04-29 Thread Dimitri Liakhovitski
Just another opinion about R^2 coming from the field of US Psychology research and business: The first and foremost technique taught in Psychology Departments in subfields where experimental designs are rarely possible (i.e., social psychology, personality psychology, developmental psychology, Indu

Re: [R] correlation coefficient

2009-04-29 Thread Peter Flom
Dieter Menne wrote >I noted the "and" was misleading. Read: Good journals like Lancet, >New English and many British Journal of XXX really help you to do >better. I am one of the statistical editors for PLoS Medicine, and I try to help people do better; often, the people take my advice. Somet

Re: [R] correlation coefficient

2009-04-29 Thread Dieter Menne
Dieter Menne menne-biomed.de> writes: > q(paper) = 10* n(pvalues) + 5*n(R^2) + 3.5*n(Error Bars) > > Values above 300 qualify for immediate acceptance, and Journals > like Lancet, New English and British Journal of XXX provide > professional advice. > I noted the "and" was misleading. Read: Goo

Re: [R] correlation coefficient

2009-04-29 Thread Jim Lemon
Dieter Menne wrote: Bert Gunter gene.com> writes: Martin's reply provides an appropriate response, so nothing to add. But my questions dig deeper: Why do so many (presumably nonstatisticians, but ?) belong to this R^2 religion? Is it because: 1) This is what they are taught in their Stat 1

Re: [R] correlation coefficient

2009-04-29 Thread Dieter Menne
Bert Gunter gene.com> writes: > Martin's reply provides an appropriate response, so nothing to add. But my > questions dig deeper: Why do so many (presumably nonstatisticians, but ?) > belong to this R^2 religion? Is it because: > > 1) This is what they are taught in their Stat 101 courses by st

Re: [R] correlation coefficient

2009-04-28 Thread Bert Gunter
2009 8:22 AM > To: Benedikt Niesterok > Cc: r-help@r-project.org > Subject: Re: [R] correlation coefficient > > >>>>> "BN" == Benedikt Niesterok > >>>>> on Tue, 28 Apr 2009 15:33:02 +0200 writes: > > BN> Hello, >

Re: [R] correlation coefficient

2009-04-28 Thread Martin Maechler
> "BN" == Benedikt Niesterok > on Tue, 28 Apr 2009 15:33:02 +0200 writes: BN> Hello, BN> I would like to get a correlation coefficient (R-squared) for my model. {{ arrrgh... how many people think they "need" an R^2 when they fit a model ?? }} BN> I don't kno

Re: [R] correlation coefficient from qq plot

2007-12-06 Thread Domenico Vistocco
You could use the qqnorm function to obtain the correlation, as: > qqp=qqnorm(rstudent(regrname)) > cor(qqp$x,qqp$y) If you do not want see the plot (as the qq.plot is richer): > qqp=qqnorm(rstudent(regrname), plot.it=F) domenico vistocco Tom Fitzhugh wrote: > Hi, > > I am trying to figure