[R] Extraction from an output
robert-mcfadden at o2.pl
robert-mcfadden at o2.pl
Mon Jan 12 12:42:09 CET 2009
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 ~ 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
More information about the R-help
mailing list