Re: [R] Adjusting p values of a matrix

2011-04-05 Thread January Weiner
>        as.matrix(p.adjust(as.dist(pmat))) Perfect! Thanks. j. > > > Benno > > On 4.Apr.2011, at 17:02, January Weiner wrote: > >> Dear all, >> >> I have an n x n matrix of p-values. The matrix is symmetrical, as it >> describes the "each against each" p values of correlation >> coefficients. >

Re: [R] Adjusting p values of a matrix

2011-04-05 Thread January Weiner
> 1. This is not an R question, AFAICS. I am afraid I was not clear enough. I am wondering how to best correct p values that are stored in a matrix, or, in more general: how to apply a function that takes a vector as an argument to the upper right (or, equivalently, lower left) half of a matrix, e

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Spencer Graves
There are, however, the multcomp and multcompView packages that might provide something of interest in this regard. "multcomp" has a companion book, "Multiple Comparisons Using R" (Bretz, Hothorn, Westfall, 2010, CRC Press), which I believe provides an excellent overview of the state of

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Benno Pütz
How about as.matrix(p.adjust(as.dist(pmat))) Benno On 4.Apr.2011, at 17:02, January Weiner wrote: > Dear all, > > I have an n x n matrix of p-values. The matrix is symmetrical, as it > describes the "each against each" p values of correlation > coefficients. > > How can I best correc

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Spencer Graves
There are also the multcomp and multcompView packages that might provide something of interest in this regard. "multcomp" has a companion book, "Multiple Comparisons Using R" (Bretz, Hothorn, Westfall, 2010, CRC Press), which I believe provides an excellent overview of the state of the

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread peter dalgaard
On Apr 4, 2011, at 17:02 , January Weiner wrote: > Dear all, > > I have an n x n matrix of p-values. The matrix is symmetrical, as it > describes the "each against each" p values of correlation > coefficients. > > How can I best correct the p values of the matrix? Notably, the total > number of

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Bert Gunter
1. This is not an R question, AFAICS. 2. Sounds like a research topic. I don't think there's a meaningful simple answer. I suspect it strongly depends on the model and context. -- Bert On Mon, Apr 4, 2011 at 8:02 AM, January Weiner wrote: > Dear all, > > I have an n x n matrix of p-values. The

[R] Adjusting p values of a matrix

2011-04-04 Thread January Weiner
Dear all, I have an n x n matrix of p-values. The matrix is symmetrical, as it describes the "each against each" p values of correlation coefficients. How can I best correct the p values of the matrix? Notably, the total number of the tests performed is n(n-1)/2, since I do not test the correlati