> From: Siegfried.Macho > > Dear R-helpers, > > 3 questions: > 1. Is there a package that contains a routine for computing > Kendall's W > (coefficient of concordance), with and without ties ?Is that the same as Kendall's tau, as in cor(..., method="kendall")?> 2. Is there a package that contains a routine for computing > Goodman' s Gamma.Don't know, if you can find out by search on CRAN.> 3. I there a simple method for computing the number of ties > as well as their lengths within a vector fo ranks, > e.g. > >r1 <- rank(c(1, 3, 2, 3, 3, 2, 4)) > > gives: > > [1] 1.0 5.0 2.5 5.0 5.0 2.5 7.0 > > which contains 2 ties with length 2 and 3.Try table(), which gives you frequencies. HTH, Andy> Thanks in advance, > S.M > > > =============================================> Dr. Siegfried Macho > Department of Psychology > University of Fribourg > Rue de Faucigny 2 > CH-1700 Fribourg > > Tel.: +41-26-3007635 > Fax.: +41-26-3009712 > http://www.unifr.ch/psycho/general/macho.htm > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
Dear R-helpers, 3 questions: 1. Is there a package that contains a routine for computing Kendall's W (coefficient of concordance), with and without ties ? 2. Is there a package that contains a routine for computing Goodman' s Gamma. 3. I there a simple method for computing the number of ties as well as their lengths within a vector fo ranks, e.g. >r1 <- rank(c(1, 3, 2, 3, 3, 2, 4)) gives: [1] 1.0 5.0 2.5 5.0 5.0 2.5 7.0 which contains 2 ties with length 2 and 3. Thanks in advance, S.M =============================================Dr. Siegfried Macho Department of Psychology University of Fribourg Rue de Faucigny 2 CH-1700 Fribourg Tel.: +41-26-3007635 Fax.: +41-26-3009712 http://www.unifr.ch/psycho/general/macho.htm
See ?cor.test Also, rowSums(outer(unique(r1),r1,"==")) gives the number of occurrences of the elements of unique(r1) --- Date: Sun, 01 Feb 2004 16:53:21 -0800 From: Siegfried.Macho <Siegfried.Macho at unifr.ch> To: <r-help at stat.math.ethz.ch> Subject: [R] 3 little questions Dear R-helpers, 3 questions: 1. Is there a package that contains a routine for computing Kendall's W (coefficient of concordance), with and without ties ? 2. Is there a package that contains a routine for computing Goodman' s Gamma. 3. I there a simple method for computing the number of ties as well as their lengths within a vector fo ranks, e.g.>r1 <- rank(c(1, 3, 2, 3, 3, 2, 4))gives: [1] 1.0 5.0 2.5 5.0 5.0 2.5 7.0 which contains 2 ties with length 2 and 3. Thanks in advance, S.M =============================================Dr. Siegfried Macho Department of Psychology University of Fribourg Rue de Faucigny 2 CH-1700 Fribourg