Using the exact functional test

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

We illustrate the exact functional test with an example. An epigenetic indicator called CpG island methylator phenotype (CIMP) is strongly associated with liver cancers. Specimens [@shen2002dna] to study CIMP were collected and divided into three groups with different CIMP status: negative (no methylated genes), intermediate (1~2 methylated genes) and positive (>2 methylated genes).

The following table gives the frequencies of observed tumor protein p53 mutations and CIMP status:

Table: CpG Island Methylator Phenotype (CIMP) and p53 mutation.


                 CIMP         CIMP           CIMP

p53 mutation Negative Intermediate Positive -------------- ---------- -------------- ---------- No 12 26 18

  Yes                 0            8                 12

require(FunChisq)
# x is a contingency table with row variable for p53 mutation and
#   column variable for CIMP
x <- matrix(c(12,26,18,0,8,12), nrow=2, ncol=3, byrow=TRUE)
x
# Test the functional dependency: p53 mutation -> CIMP
res <- fun.chisq.test(x, method="exact")
print(res)
pval.text <- format.pval(res$p.value, digits=2)
xif.text <- format.pval(res$estimate, digits=2)
plot_table(
  x, xlab="CIMP", ylab="p53 mutation", col="seagreen3",
  main=bquote(italic(P)~'='~.(pval.text)*','~~italic(xi[f])~'='~.(xif.text)))

References


references: - id: shen2002dna title: DNA methylation and environmental exposures in human hepatocellular carcinoma author: - family: Shen given: L. - family: Ahuja given: N. - family: Shen given: Y. - family: Habib given: N. A. - family: Toyota given: M. - family: Rashid given: A. - family: Issa given: J.-P. J. container-title: Journal of the National Cancer Institute volume: 94 issue: 10 page: 755-761 type: article-journal issued: year: 2002 ...



Try the FunChisq package in your browser

Any scripts or data that you put into this service are public.

FunChisq documentation built on May 31, 2023, 8:18 p.m.