Displaying 20 results from an estimated 23 matches for "wilcox_test".
2008 Jan 26
1
How to apply the wilcox_test function to subsets ?
Dear R-forumites,
I want to apply a Wilcoxon test on subsets of the data frame mydata,
splitted using the myindice variable. When I send :
wilcoxtest <- by(mydata, mydata$myindice, function(x)
{wilcox_test(x$value~x$fact)})
I get :
Error in eval(expr, envir, enclos) : object "x" not found
whereas
wilcoxtest <- by(mydata, mydata$myindice, function(x)
{wilcox.test(x$value~x$fact)})
works !
Why does it fail with the wilcox_test only? And, most important, how can I
a...
2013 May 30
1
wilcox_test function in coin package
Dear All,
I have two simple data samples (no groups or factors, etc.) and would just
like to compute the two-sample Wilcoxon Rank Sum test using the wilcox_test
function contained in the coin package, which is reportedly better than the
regular wilcox.test function because it performs some adjustment for ties.
Would anyone know how to craft a script to perform this task? Much
appreciated.
Janh
[[alternative HTML version deleted]]
2010 Aug 17
3
Weird differing results when using the Wilcoxon-test
Hi,
I became a little bit confused when working with the Wilcoxon test in R.
As far as I understood, there are mainly two versions:
1) wilcox.test{stats}, which is the default and an approximation, especially,
when ties are involved
2) wilcox_test{coin}, which does calculate the distribution _exactly_ even,
with ties.
I have the following scenario:
#---BeginCode---
# big example
size = 60
big1 = rnorm(size, 0, 1)
big2 = rnorm(size, 0.5, 1
g1f = rep(1, size)
g2f = rep(2, size)
big = c(big1, big2)
data_frame = data.frame(big, gr=as.factor(...
2006 Oct 05
1
The W statistic in wilcox.exact
Does anyone know why wilcox.exact gives W-statistic 6 instead of 12 as indicated below.
12 is the rank sum of group 0 of x, which is the linear statistic computed by wilcox_test.
y<-c(1,2,3,4,5)
x<-c(1,1,0,0,0)
(a) wilcox.exact
wilcox.exact(y~x)
Exact Wilcoxon rank sum test
data: y by x
W = 6, p-value = 0.2
alternative hypothesis: true mu is not equal to 0
(b) wilcox_test
tt<-wilcox_test(y~factor(x),distribution="exact")
statistic(tt,"line...
2010 Feb 24
1
extracting results from wilcox_test (package::coin)
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by()
to group by site Output is a list:
>Herb.KW
Herb.df$ID: 10-1
Kruskal-Wallis rank sum test
data: Indicator_Rating by Year
Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302
-----------------------------------------------------------------------------------------------------
Herb.df$ID: 18-1
2007 Jul 12
1
Subsetting problem
I need to perform the Exact Wilcoxon Mann-Whitney on a subset of my database.
Assuming that IPPO is my data frame and IPPOBIS is the subset my variable still
have 3 different levels and the function wilcox_test (package "coin")
does not accept it.
I do not know how to overcome this problem.
ippo <- c(rep("A",10),rep("B",10),rep("C",10))
ippo2 <- c(rnorm(10,0,1),rnorm(10,10,10),rnorm(10,10,10))
IPPO <- data.frame(ippo,ippo2)
IPPOBIS <- IPPO[IPPO$ippo =...
2006 Sep 29
1
Confidence interval in the Wilcoxon exact test
Hi,
Two functions wilcox.exact and wilcox_test give slightly different confidence intervals of the difference of the medians: for example
y<-c(0,0,1.081,0.594,0,0.769,0,0.009,0,0,0.798,0.405,0.498,0.946,1.35,1.149,0.528)
x<-c(rep(1,10),rep(2,7))
aa<-wilcox.exact(y~x,conf.int=TRUE)
bb<-wilcox_test(y~factor(x),distribution="e...
2005 Nov 14
1
effect sizes for Wilcoxon tests
Hello,
I use t.test for normal distributed and wilcox.test for non-normal
distributed samples.
It is easy to write a function for t.test that calculates the effect
size, because all parts of the formula are available from the t.test
result: r = sqrt(t*t / (t*t + df))
However, for Wilcoxon tests, the formula for effect sizes is:
r = Z / sqrt(N)
I wonder how I can calculate the Z-score in R for
2005 Dec 20
1
Wilcoxon Mann-Whitney Rank Sum Test in R
An earlier post had posed the question: "Does anybody know what is relation
between 'T' value calculated by 'wilcox_test' function (coin package) and
more common 'W' value?"
I found the question interesting and ran the commands in R and SPSS. The W
reported by R did not seem to correspond to either Mann-Whitney U,
Wilcoxon W or the Z which I have more commonly used. Correction for ties
may hav...
2006 Sep 29
1
Wilcoxon Rank test of Package Coin
Hi,
I am running the following example which can be found on page 12 of the pdf file of COIN package
wt<-wilcox_test(pd~age,data=water_transfer,distribution="exact", conf.int=TRUE)
"wt" actually contains the estimate of difference in location and the confidence interval of it. I am just wondering how can I extract these values? From the examples, I understand that the Wilcoxon statistic can...
2011 Jul 08
4
Using t tests
Dear Sir,
I am doing some work on a population of patients. About half of them are
admitted into hospital with albumin levels less than 33. The other half have
albumin levels greater than 33, so I stratify them into 2 groups, x and y
respectively.
I suspect that the average length of stay in hospital for the group of
patients (x) with albumin levels less than 33 is greater than those
2008 Jan 16
0
Exact wilcoxon may differ in R and SPSS/StatXact (due to round off in the latter pair)
....
While the former entry probably is the result of some stupid algorithmic
twist in some software (take your guesses), I think that wilcox_exact in
the coin package is superior by not assuming that data are to be tied
when deemed close enough by some poor defined measure (but I'm biased).
Try wilcox_test(delta_hba1c~as.factor(Treatment), data=U,
distribution="exact")
And wilcox_test(signif(delta_hba1c,3)~as.factor(Treatment), data=U,
distribution="exact")
Thanks to Torsten Hothorn for discussing this with me and for producing
such a neat package (together with Kurt Hornik, Mark...
2012 Jul 06
1
Mann-Whitney by group
Hello,
I'm having some issues grouping cases for some Mann-Whitney U tests I'm attempting to run. I'm willing to use wilcox.test if it'll work; I've also tried wilcox_test() from the "coin" package. Here's the deal: for each column (A through H), I would like to run the two-sample independent test, comparing Group 5 (CD8.14 through CD8.17) to Group 6 (CD8.18 through CD8.21). So, for A, test Group 5 agains Group 6, for B, test Group 5 against Group 6, an...
2011 Oct 06
1
Wilcox Test / Mann Whitney U Test
Hello List,
I'm trying to prepare some lecture notes on non parametric methods,
and I can't manually reproduce the results of the wilcox.test function
for ordinal data.
The data I'm using are from David Howell's website, available here
http://www.uvm.edu/~dhowell/StatPages/More_Stuff/OrdinalChisq/OrdinalChiSq.html
If I run the wilcox.test function on the data I get a p-value of
2013 Sep 15
1
b
LO HICE DE ESTA MANERA Y FUNCIONÓ
a_HTA <- (estudiantes1[,c(1)])
IMC <- (estudiantes1[,c(2)])
estudiantes4 <- data.frame( IMC, a_HTA = factor(c(rep("si", 29),
rep("no",30))))
wt <- wilcox_test(IMC ~ a_HTA, data = estudiantes4,
distribution = "exact", conf.int = TRUE)
print(wt)
De: Jorge I Velez [mailto:jorgeivanvelez@gmail.com]
Enviado el: Sunday, September 15, 2013 4:37 PM
Para: Dr. José A. Betancourt B.
CC: R-help-es
Asunto: Re: [R-es] b
Eso no f...
2005 Dec 02
1
sign and sign rank tests
R 2.1.1 on Windows 2K
I hope one and all will allow both an R question and a general stats question:
(1) Is there any function that will perform non-parametric tests such as a sign test or a signed rank test? I know I could program both but I would prefer not re-inventing the wheel.
(2) When performing a sign test, the usual practice is to drop zero values. Is there any theoretical reason
2009 Nov 01
1
wilcox.test construction in r
Hi, I am very confused with constructing the wilcox.test in R.
I have two populations 'original' and 'test'.
I want to know if the 'test' is generally 'lower' than original.
I use alpha of 0.05.
So do I write the function as wilcox.test(original, test, alternative="l")?
or wlcox.test(original, test, alternative = "g")?
or wilcox.test(test,
2009 Oct 27
1
wilcox.exact() problem
Dear R friends,
here I write again about the wilcox.exact() problem. I want to compare two sets of categorical data, and in one case it says "negative length vectors not allowed", and in the other one I get the error "cannot allocate vector of length ...".
On http://rapidshare.com/files/298621893/wilcox.exact_trouble.Rdata.html you can download the data that cause the
2009 Aug 26
3
mann whitney u
Dear Sir,
I am comparing two samples using wilcox.test in R. Literature appears to describe mann whitney u test as the most appropriate test to use on my data.
is the wilcox.test function equivalent to mann-whitney u? Is there a way to gain the U-value as apposed to the W-value in R?
Thank you
2013 Sep 16
0
b
...na es asi
estudiantes1<-read.csv("estudiantes1.csv",header=TRUE, sep=",", dec=".")
a_HTA <- (estudiantes1[,c(1)])
IMC <- (estudiantes1[,c(2)])
estudiantes4 <- data.frame( IMC, a_HTA = factor(c(rep("si", 29),
rep("no",30))))
wt <- wilcox_test(IMC ~ a_HTA, data = estudiantes4,
distribution = "exact", conf.int = TRUE)
print(wt)
en la ayuda dice
Independent Two- and K-Sample Location Tests
Description
Testing the equality of the distributions of a numeric response in two or
more independent groups against sh...