Hello, I have a data frame containing several parameters. I want to investigate pair wise correlations between all of the parameters. For doing so I used the command cor(data.frame, method=?spearman?), the result is a matrix giving me the correlation coefficients of each pair, but not the p-values. Is it possible to get same matrix showing just the p-values instead of the correlation coefficients? As far as I know the command cor.test just works for two given vector, but not for a whole data frame. Thanks! ----- Tamara Hoebinger University of Vienna -- View this message in context: http://www.nabble.com/p-values-of-correlation-matrix-tp23023454p23023454.html Sent from the R help mailing list archive at Nabble.com.
Hi, on response to the thread of february, I recently uploaded the package alphahull, that computes the alpha-shape of a given sample of points in the plane. Regrets, Bea ______________________________________ Beatriz Pateiro L?pez Departamento de Estat?stica e IO Universidad de Santiago de Compostela Spain
On 4/13/2009 10:56 AM, thoeb wrote:> Hello, > I have a data frame containing several parameters. I want to investigate > pair wise correlations between all of the parameters. For doing so I used > the command cor(data.frame, method=?spearman?), the result is a matrix > giving me the correlation coefficients of each pair, but not the p-values. > Is it possible to get same matrix showing just the p-values instead of the > correlation coefficients? As far as I know the command cor.test just works > for two given vector, but not for a whole data frame. > Thanks!library(Hmisc) ?rcorr> ----- > Tamara Hoebinger > University of Vienna-- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894
Have a look at function rcor.test() from package ltm, e.g., library(ltm) mat <- matrix(rnorm(1000), 100, 10, dimnames = list(NULL, LETTERS[1:10])) rcor.test(mat) rcor.test(mat, method = "kendall") rcor.test(mat, method = "spearman") I hope it helps. Best, Dimitris> > Hello, > I have a data frame containing several parameters. I want to investigate > pair wise correlations between all of the parameters. For doing so I used > the command cor(data.frame, method=???spearman???), the result is a matrix > giving me the correlation coefficients of each pair, but not the p-values. > Is it possible to get same matrix showing just the p-values instead of the > correlation coefficients? As far as I know the command cor.test just works > for two given vector, but not for a whole data frame. > Thanks! > > > ----- > Tamara Hoebinger > University of Vienna > -- > View this message in context: > http://www.nabble.com/p-values-of-correlation-matrix-tp23023454p23023454.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >-- Dimitris Rizopoulos Assistant Professor Department of Biostatistics Erasmus University Medical Center Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014