Displaying 20 results from an estimated 9000 matches similar to: "Extracting Element from S4 objects"
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
2007 Nov 01
1
Help me in Cochran armitage trend test Coding
Dear sir,
I am Shibu John from Thrombosis Research Institute India. It is a
multidisciplinary organisation 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
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,
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
2009 Jan 12
1
Extraction from an output
Hello,
Would you tell my how to extract a result from a test - it's justified 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 ~
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
2008 Jan 18
1
Fortran level mismatch between package and R
We have a user here who is attempting to compile a package which
requires f90 (gfortran will do). Our version of R was built with f77
(g77). When the user attempts to build the package, f77 is always
invoked and fails due to the presence of f90 features.
Is there a simple method or some documentation on how to force a
package build to use a different compiler than the one used in
2007 Jul 23
2
R2.6 bug in arithmetics of S4 classes inherited from 'array', or intended behavior?
Hi,
I have an S4 class directly derived from 'array' as shown in the code
below (EBImage package of Bioconductor 2.1, devel), it simply contains
array adding a couple of slots:
setClass ("Image",
representation (colormode="integer", filename="character",
compression="character", resolution="numeric", features="list"
),
2008 May 07
6
help with updating to R2.7
Hi,
From R 2.6, I would like to update to R2.7. I would like to have some tips on the recommended method of installing the latest versions of an entire list of packages in R2.7 - i.e. all the packages that I have presently installed in R2.6.
I am hoping that there is an easier method than fetching the packages individually as I did, to begin with, for R2.6.
Additionally, I would like to install
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
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
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 Independence Test
data: pheno by groups 1 < 2
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
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 Dec 03
2
interaction with C++ code (PR#10487)
Full_Name: Ian Wilson
Version: 2.6.1
OS: linux
Submission from: (NULL) (128.240.229.7)
The problem is new to R2.6.?. The code works as expected in R-2.5.0. I get the
problem with two different operating systems - an older redhat and new ubuntu
and with both g++4.1 and g++3.4.
I have a problem with character data that is passed back from C++ code. A small
example is the following C++ code
2006 Dec 28
0
Cochran-Armitage statistics
Dear R-enthusiasts,
I am trying to do a Cochran-Armitage test for trend in R. After consulting
google I found Torsten Hothorn's remark that the 'coin' library could be
used.
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)),
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
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
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:
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
Any idea why CHAR(asChar(STRING_ELT( produces NA whereas
CHAR(STRING_ELT( gets a pointer to a string? It's generally expected
that STRING_ELT should already be a character, but why the coercion does
not work? Here is a simple example (consistent over R2.5.1-R2.6 rev
42284, I didn't check earlier versions, but it used to be different in
2.4):
install.packages("inline")