[R] Help me in Cochran armitage trend test Coding

Shibu John shibu at triindia.org.in
Thu Nov 1 06:45:38 CET 2007


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
"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 codes from R

> library("coin")
Loading required package: survival
Loading required package: splines
Loading required package: mvtnorm
Error: package 'modeltools' required by 'coin' could not be found
In addition: Warning messages:
1: package 'coin' was built under R version 2.6.0
2: package 'survival' was built under R version 2.5.1
3: package 'mvtnorm' was built under R version 2.5.1
> 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))))
> table(lungtumor$dose, lungtumor$tumor)

     0  1
  0 38  2
  1 43  7
  2 33 15
> independence_test(tumor ~ dose, data = lungtumor, teststat = "quad")
Error: could not find function "independence_test"
>



sincerely,

Shibu John
Research Assistant
Department of Bioinformatics
Thrombosis Research Institute
Narayana Hrudayalaya
258/A Bommasandra Industrial Area, Anekal Taluk
Bangalore 560099, India



More information about the R-help mailing list