search for: bskeller

Displaying 3 results from an estimated 3 matches for "bskeller".

Did you mean: bsbkeller
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
2009 Sep 03
2
Recursion is slow
The following recursion is about 120 times faster in C#. I know R is not known for its speed with recursions but I'm wondering if anyone has a tip about how to speed things up in R. #"T" is a vector and "m" is a number between 1 and sum(T) A <- function(T,m) { lt <- length(T) if (lt == 1) { if (0 <= m & m <= T[1]) { return(1) } else { return(0) }
2010 May 30
2
Question about package coin
Anyone know if coin can run a permutation test based on a (user-defined) statistic other than the mean difference? The function independence_test does the permutation t-test via difference in means. I'm wondering if it's possible to use independence_test to run a permutation test for some other statistic than the difference in means. For example, I'd like to run a permutation test