search for: independence_test

Displaying 15 results from an estimated 15 matches for "independence_test".

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 using Welch's t instead of the difference i...
2007 Nov 01
1
Help me in Cochran armitage trend test Coding
...ion concerned with the interrelated problems of thrombosis and atherosclerosis. I was searching for Cochran armitage trend test program in R. Then I had seen your R coding for C-A trend test. I tried that in the R software. But I can?t run the program due the [Error: could not find function "independence_test"]. Where is the declaration of this function? I was trying the trend test for Genotype frequency in Cases and controls. So I would like to know how to do the Monte carlo simulation test with Cochran armitage trend test. Sir can you please help me to solve the problem. Here I copied the co...
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 <- dat...
2009 Jan 12
1
Extraction from an output
...stified because I need to run this test many times. Here is an example from authors' test: > library("coin") > lungtumor <- data.frame(dose = rep(c(0, 1, 2), c(40, 50, 48)), tumor = c(rep(c(0, 1), c(38, 2)), rep(c(0, 1), c(43, 7)), rep(c(0, 1), c(33, 15)))) > ca.test<-independence_test(tumor ~ dose, data = lungtumor, teststat = "quad") > ca.test Asymptotic General Independence Test data: tumor by dose chi-squared = 10.6381, df = 1, p-value = 0.001108 How to use ca.test and extract p-value and chi-squared. Robert
2006 Aug 18
0
[Fwd: Trend test and test for homogeneity of odd-ratios]
I partly answered my question since independence_test() function in coin package apparently do Cochran-Armitage trend test just like Eric Lecoutre's function tabletrend() - slightly modified here: > independence_test(pheno ~ geno, data = dat2, teststat = "quad", scores = list(geno = c(0, 1, 2))) Asymptotic General Indepen...
2009 Apr 29
1
Extracting Element from S4 objects
Are there internal methods available for R2.6 (I'm using the mac os x gui) for extracting (or subsetting) S4 objects? Using the independence_test() function implemented in the COIN package, I can't seem to select out p-values upon completion of each iteration of a loop. Sorry if my search was incomplete beforehand. -- View this message in context: http://www.nabble.com/Extracting-Element-from-S4-objects-tp23302265p23302265.html Sent fr...
2013 Sep 23
1
Permutation Test on Interactions {coin}
...his case. For example, should I interpret the p-value in the example below as the pvalue of the interaction effect between group and the covariate x. set.seed(1) library("coin") data("rotarod", package = "coin") x <- rnorm(24) rotarod <- cbind(rotarod, x) pvalue(independence_test(time ~ group * x, data = rotarod)) Your advice would be much appreciated. Regards, Axel. [[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
2005 Aug 04
2
p-values
HI R-users, I am trying to repeat an example from Rayner and Best "A contingency table approach to nonparametric testing (Chapter 7, Ice cream example). In their book they calculate Durbin's statistic, D1, a dispersion statistics, D2, and a residual. P-values for each statistic is calculated from a chi-square distribution and also Monte Carlo p-values. I have found similar p-values
2006 Dec 28
0
Cochran-Armitage statistics
...rep(c(0, 1), c(38, 2)), rep(c(0, 1), c(43, 7)), rep(c(0, 1), c(33, 15)))) table(lungtumor$dose, lungtumor$tumor) ### Cochran-Armitage test (permutation equivalent to correlation ### between dose and tumor), cf. Table 2 for results independence_test(tumor ~ dose, data = lungtumor, teststat = "quad") (http://tolstoy.newcastle.edu.au/R/help/05/11/16601.html). In Peter Dalgaards Introductory statistics with R, a similar test for trends in proportions (prop.trend.test) is described (page 134). I wonder whether prop.trend.test and ind...
2007 Sep 05
1
question: randomization t-test function already defined in R?
Dear R Users, I am hoping you can help me. I have received code from a colleague who uses Matlab. I need to translate it into R. I am wondering if there is a randomization t-test (from non-parametric statistics) function already defined in R. (In Matlab the function is randtest.m.) ************************************************************************ ********** QUESTION: Is anyone
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 standardized scalar test statistic (scalar), or a maximum type statistic (max) or a quadratic form (quad). My current problem is a...
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 comparisons with the perm package show that coin does the actual permutation tests much faster than perm but when I appl...
2012 Jun 27
1
trend in incidence rate
I would like to compare the incidence rates of three groups. They are supposed to have different risks so I would like to test whether there is a increasing trend in the incidence rates. Does R or any packages provide a trend test for incidence rates? I checked epiR and epitools. It seems they do not have this function. Thank you for the help. -- View this message in context:
2006 Jul 20
3
Permutation Distribution
Hallo Is there an elegant way to do the following: Dataset consists of 2 variables: var1: some measurements, and var2: a grouping variable with two values, 1 and 2. There are (say) 10 measurements from group 1 and 15 measurements from group 2. The idea is to study the permutation distribution of mean(group 1) * mean(group2). One way would be to permute 1s and 2s and select the corresponding