Displaying 20 results from an estimated 20000 matches similar to: "new package: perm"
2010 Apr 26
0
Permutation tests using apply function with package coin
I am using "apply" to run exact permutation t-tests by columns
using the coin package. For example:
library(coin)
dat <- matrix(rnorm(7*35),7,35)
fun <- function(x) {
pvalue( independence_test(x~f,
data=data.frame(x, f=factor(c(rep("a",4),rep("b",3)))),
distribution = "exact"))
}
p.vals <- apply(dat, 2, fun)
Some small-scale
2017 Sep 08
0
one sample permutation test using package 'coin'
Using the package ?exactRankTests? one can execute a one-sample permutation test for a hypothesized location parameter of 0 like:
perm.test(rnorm(30,0))
The package ?exactRankTests? seems now to be deprecated in favor of the ?coin? package which as I understand is a superset of ?exactRankTests? in terms of functionality.
The ?coin? package allows one to run a two-sample permutation test using
2009 Oct 25
1
A naive question about permutation tests in the coin package
Dear R helpers,
I am trying to understand how to use the independence_test function in
the coin package. I think I suffer from a misunderstanding about what
the package does. Either that or I do not understand how to use it
properly. Specifically, I cannot understand if I can test independence
of arbitrary statistics.
Take the following example:
set.seed(10)
d <- data.frame(y = c(rnorm(10,
2012 Jul 12
1
permutation test on paired samples
Hi,
I'm trying to run a permutation test on paired samples.
First I tried the package "exactRankTests":
require("exactRankTests")
x <- c(1.83,0.50,1.62,2.48,1.68,1.88,1.55,3.06,1.30)
y <- c(0.878,0.647,0.598,2.05,1.06,1.29,1.06,3.14,1.29)
wilcox.test(x,y,paired = TRUE,alternative = "greater")
perm.test(y,x,paired = TRUE,exact = TRUE,alternative =
2009 Sep 08
0
Confusion on use of permTS() in 'perm'
Consider the following simple example using R-2.9.0 and 'perm' 2.9.1:
> require('perm')
> p<- c(15,21,26,32,39,45,52,60,70,82)
> g<- c('y','n','y','y', rep('n',6)) #Patients ranked 1,3,4 receive treatment
> permTS(p ~ g, alternative = 'two.sided', method='exact.ce') #find
p-value by complete enumeration
2011 Sep 18
1
perm.test()
Hi!
I am doing a two sample permutation test and trying to find confidence
interval. perm.test() seems can do that but when the vector contains
negative numbers it occurs an error. And for perm.test(x,y), elements in x
can't be more than in y. I am wondering how I can fix these two problems?
Thanks a lot.
--
View this message in context:
2002 Sep 05
1
Help with perm.test please
Hi All:
OK, this is probably a stupid thing to do but.......
Say I have 706 controls and 6 treatments, and want to
do a basic two-sample permutation test. I could do a
monte carlo approximation but instead want to use
perm.test.
Now it happens that my data is counts with
> unique(x)
[1] 1 2
> unique(y)
[1] 1 2 5 3 10 9 7 4 6 11 8 23 18 30 16 29
42
so there aren't that many
2010 Apr 22
1
What is the test statistics in perm.test
Hi,
The permutation test for two samples in R is function perm.test(). I could
not figure out what is the statistics it estimate and how many permutation
it did in default?
Thanks,
[[alternative HTML version deleted]]
2010 Apr 22
2
Jonckheere-Terpstra test using coin package?
Is it possible to implement the Jonckheere-Terpstra test for ordered
alternatives using the coin package: Conditional Inference Procedures
in a Permutation Test Framework?
I found jonckheere.test{clinfun}, but it uses a normal approximation
when ties are present in the data. To make this concrete, I've
include
a small dataset. Thanks. --Dale
Hollander and Wolfe, 1999 Table 6.6, pg 205
2009 Oct 16
2
"negative length vectors are not allowed" in wilcox.exact() and perm.test()
Dear R friends,
I want to compare two datasets and I get the message
Error in .Call("cpermdist2", ma = as.integer(m), mb = as.integer(col), :
negative length vectors are not allowed
after specifying the exact test. I'm using the exactRankTests package. Do you suggest me using the coin library, or is there anything "wrong" with my data?
Kind regards,
David
--
2011 Apr 12
2
The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?
I have a question concerning the Wilcoxon signed-rank test, and
specifically, which R subroutine I should use for my particular dataset.
There are three different commands in R (that I'm aware of) that calculate
the Wilcoxon signed-rank test; wilcox.test, wilcox.exact, and
wilcoxsign_test. When I run the three commands on the same dataset, I get
different p-values. I'm hoping that
2007 Jun 06
0
R package: Mchtest - Monte Carlo hypothesis testing allowing Sequential Stopping
Hi,
This is an announcement for a package that has been up on CRAN since March 2006 but was never announced.
The package is Mchtest - for Monte Carlo hypothesis tests allowing sequential stopping. The idea is to use the sequential probability ratio test boundaries to stop resampling for a Monte Carlo hypothesis test such as a bootstrap or permutation test. This means that you will take many
2007 Jun 06
0
R package: Mchtest - Monte Carlo hypothesis testing allowing Sequential Stopping
Hi,
This is an announcement for a package that has been up on CRAN since March 2006 but was never announced.
The package is Mchtest - for Monte Carlo hypothesis tests allowing sequential stopping. The idea is to use the sequential probability ratio test boundaries to stop resampling for a Monte Carlo hypothesis test such as a bootstrap or permutation test. This means that you will take many
2005 Nov 30
1
Permutation tests for correlations
Apropos the question about permutation tests in multiple regression:
We do have perm.test in package ExactRankTests, but it does one- and
two-sample tests, as in t.test, wilcox.test, etc. There doesn't seem
to be an exact version of the permutation test for correlations, i.e.,
the one that could be estimated using
replicate(10000, cor(x,sample(y))) # or other values of 10000
or, of course,
2008 Jul 20
0
coin package (conditional inference / permutation): parameter teststat
Dear R-list members,
This is in fact a question about statistics, not directly
about the R software.
The coin package, for conditional inference through permutation
methods, has as it main function the function independence_test.
One of its parameters is teststat, about which the package
documentation says:
teststat: "a character, the type of test statistic to be applied:
either a
2010 Jan 26
1
poisson.test from stats package does not pass the conf.level (PR#14195)
Hi,
The poisson.test function from stats package does not pass the conf.level p=
arameter for the two-sample test. Here is an example:
poisson.test(c(2,4),c(20,14),conf.level=3D.95)$conf.int
poisson.test(c(2,4),c(20,14),conf.level=3D.9)$conf.int
Here is the solution, change:
RVAL <- binom.test(x, sum(x), r * T[1]/(r * T[1] + T[2]),
alternative =3D alternative)
to:
2009 Aug 03
0
new package: interval
I have just uploaded a new package called interval. It does weighted logrank tests (e.g., logrank, Wilcoxon-type tests) on interval censored data. It allows Surv objects and can calculated exact p-values. It calls the perm package, but also allows calculation of scores that may be output to faster permutation packages like coin.
There is a full description of the packge and methods in a
2009 Aug 03
0
new package: interval
I have just uploaded a new package called interval. It does weighted logrank tests (e.g., logrank, Wilcoxon-type tests) on interval censored data. It allows Surv objects and can calculated exact p-values. It calls the perm package, but also allows calculation of scores that may be output to faster permutation packages like coin.
There is a full description of the packge and methods in a
2004 Jul 16
0
Permutations (summary)
Dear R users,
This is a second summary of the permutation problem I previously posted.
This summary restates the problem as well as the solution.
First of all thanks to everyone including Erich, Robin, Gabor, Christian,
Ingmar and others for your suggestions.
With the help of an off-list discussion with Gabor I?m going to summarize.
THE PROBLEM
We have 12 elements in blocks of 3 :
1 2
2008 Apr 06
3
Multiset Permutations
Dear R users,
I want to perform an exact permutation of multisets. I have looked at the
coin package, but it doesn't seem to offer what I am looking for. I want to
perform permutations (exact - without duplications) on multisets of scalars
(e.g., the multiset 0,0,1,2,2). I want to output all the possible
permutations into a data frame so that each multiset permutation occupies a
row (or