search for: coin

Displaying 20 results from an estimated 419 matches for "coin".

2008 Oct 09
4
runs of heads when flipping a coin
Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up tails) I plan on flipping the coin nnn times (for example, nnn = 500) What is the expected probability or frequency of a run of rrr heads* during the nnn=500 coin flips? Moreover, I would probably (excuse the pun) want the answer for...
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(1...
2012 Jun 03
1
Problems installing Packages
Hello, I am going through Zhao's RDataMining PDF, and to redo all the graphics on my computer, I need several packages, 'coin' and 'party' to name two. I get the following error: > install.packages("coin") Installing package(s) into ?/home/sven/R/i686-pc-linux-gnu-library/2.15? (as ?lib? is unspecified) trying URL 'http://cran.ma.imperial.ac.uk/src/contrib/coin_1.0-21.tar.gz' Content typ...
2011 Oct 31
2
one sample Wilcoxon test using 'coin'
Hi, R allows me to run a one sample Wilcoxon test like this: wilcox.test(c(1,3.5,2.1,4,1.5,5), mu=2, exact=TRUE) The function 'wilcoxsign_test' from the package 'coin' should (I suppose) be able to calculate exact p values even if there are ties in the ranks. However, I couldn't find information on how to run a one sample test using 'wilcoxsign_test' like in the example above. Can anybody help? Thanks, Holger
2013 Sep 23
1
Permutation Test on Interactions {coin}
Dear List, I'm interested in performing a permutation test on the interaction between a binary treatment indicator and a covariate (either continuous or categorical). I'm interested in the p-value of the interaction effect from a permutation test, and I'm using the coin package for that purpose. As I haven't seen any examples like this in the package documentation (or anywhere else), I'm not sure how to specify the test in this case. For example, should I interpret the p-value in the example below as the pvalue of the interaction effect between group and...
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...
2012 Jan 09
2
Unexpected results using the oneway_test in the coin package
Dear fellow R users, Keywords: Kruskal-Wallis, Post-Hoc, pair-wise comparisons, Nemenyi-Damico-Wolfe-Dunn test, coin package, oneway_test I am using the "oneway_test" function in the R package "coin" and I am obtaining results which I cannot believe are accurate. I do not wish to waste anyone's time and so if the following problem is rather trivial, I apologize, however I could not seem t...
2010 Dec 10
1
New Installs, Same Trouble Loading doBy and coin Packages
I tried Tal's suggestion of deleting the doBy and coin packages and then reinstalling them from a different mirror. The first install was from the Harvard mirror and the second was from the Case Western Univ. mirror. The new packages generate the same errors when I call them using the library() command. Also, I tried to load these packages using R...
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-sca...
2004 Feb 03
2
Detecting answer supervison from an AGI app
I've got a dumb Western Electric payphone and some homebuilt hardware to control the coin relay which is accessible to Asterisk through the AGI interface. I'd like to be able to set the state of the coin relay to collect at the end of a call if a called party answers. [Hey, I admit this project is being persued just for the fun of it ] Looking through the documentation, there is a...
2009 May 07
1
error using lapply with oneway_test (coin package)
Dear expeRts, I would like to use a oneway_test (from package coin) to test whether two groups differ on various variables. The variables are encoded within a data frame. Unfortunately, I obtained an error, that I don't understand. Could you please help me ? Example: library(coin) y <- as.data.frame(matrix(rnorm(200), ncol=2)) group <- as.factor(u...
2010 Feb 08
1
Wilcoxon signed-ranks test using package coin ?
...e Wilcoxon signed-rank test. Data: (with one zero difference and tied ranks) x <- c(136, 103, 91, 122, 96, 145, 140, 138, 126, 120, 99, 125, 91,142, 119, 137) M.0 <- 119 > library(exactRankTests) Package ?exactRankTests? is no longer under development. Please consider using package ?coin? instead. > wilcox.exact(x, mu=M.0) Exact Wilcoxon signed rank test data: x V = 65.5, p-value = 0.771 alternative hypothesis: true mu is not equal to 119 I've been unable to implement this test using library(coin) - is this possible? Thanks. --Dale
2010 Oct 13
2
Coin Toss Simulation
I am trying a simple toin coss simulation, of say 200 coin tosses. The idea is to have a data frame like so: Experiment# Number_Of_Heads 1 104 2 96 3 101 So I do: d <-data.frame(exp_num=c(1,2,3)); /* Just 3 experiments to begin with */ d$head_ct <-sum(sample(0:1,200,re...
2016 Jan 26
2
Corregir mismo ID para individuos diferentes en una serie temporal
...rame(ID=rep_val, Year=rep_val, newID=rep_val, hmyears=rep_val) for(i in 1:nrow(df)) { #Cero print(i) if(i==1) { new_df$ID[i] <- df$ID[i] new_df$Year[i] <- df$Year[i] new_df$newID[i] <- df$ID[i] new_df$hmyears[i] <- 1 } else { #Uno coin <- which(df$ID[i]==df$ID[1:(i-1)]) print(coin) if(length(coin) < 1 ) { new_df$ID[i] <- df$ID[i] new_df$Year[i] <- df$Year[i] if(length(which(df$ID[i]==new_df$newID)) < 1) {new_df$newID[i] <- df$ID[i]} else {new_df$newID[i] <- max(new_df$newID)+1}...
2010 Dec 08
1
Trouble Loading doBy and coin Packages
Good Evening R-Help Community: I have attached a file that contains the output from sessionInfo() and a summary of my Win XP system. I am?running R 2.12.0 and using Tinn-R 2.3.6.2 as my interface. When I attempt to call either the doBy or coin packages R generates an error that I do not understand and have so far not been able to resolve by searching R resources. I exchanged a couple of emails with Soren Hojsgaard who does not think the doBy error is directly related to the package itself, and he suggested that I post this problem f...
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 tha...
2009 Aug 31
4
Offtopic, HT vs. HH in coin flips
Dear R-help, Could someone please try to explain this paradox to me? What is more likely to show up first in a string of coin tosses, "Heads then Tails", or "Heads then Heads"? ##generate 2500 strings of random coin flips ht <- replicate(2500, paste(sample(c("H", "T"), 100, replace = TRUE), collapse = "")) ## find first occurren...
2005 Jun 03
0
New CRAN package `coin'
Conditional Inference Procedures in a Permutation Test Framework The `coin' package implements a general framework for conditional inference procedures, commonly known as permutation tests, theoretically derived by Strasser & Weber (1999). The conditional expectation and covariance for a broad class of multivariate linear statistics as well as the corresponding mu...
2005 Jun 03
0
New CRAN package `coin'
Conditional Inference Procedures in a Permutation Test Framework The `coin' package implements a general framework for conditional inference procedures, commonly known as permutation tests, theoretically derived by Strasser & Weber (1999). The conditional expectation and covariance for a broad class of multivariate linear statistics as well as the corresponding mu...
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...