R: Calculate bootstrap p-values for mutual information (MI)...
bootstrapMI
R Documentation
Calculate bootstrap p-values for mutual information (MI) measures
Description
This function takes a numerical matrix (or two vectors) and calculates
bootstrapped (by permutation) p-values to test if the mutual
information value is equal to zero. If the first argument is a matrix,
the p-values are calculated between all pairs of rows of the matrix.
Usage
bootstrapMI(x, y=NULL, bRep, ret="p-value")
Arguments
x
numerical matrix or vector to be analysed. If a vector, the
argument y must be informed.
y
numerical vector. Must be informed if x is a
vector. If x is a matrix, this argument is ignored. Defaults
to NULL.
bRep
number of permutation to be done in the test.
ret
character string with the value to return. Must be
'p-value' (default) for the usual p-value or 'max', to return the
maximum absolute correlation value obtained by the permutation.
Details
The method implemented in this function is proposed by Butte and
Kohane (2000). The MI value is calculated using the function MI.
Value
The result of this function is a square matrix (length equal to the
number of rows of x) if x is a matrix or a numerical
value if x and y are vectors. The result is the p-values
or maximum MI values calculated by permutation tests.
Butte, A.J. and Kohane, I.S. Mutual information relevance networks:
functional genomic clustering using pairwise entropy measurements. In
Pacific Symposium on Biocomputing, 5, 415-426, 2000
(http://psb.stanford.edu/psb-online/proceedings/psb00/)
See Also
MI
Examples
x <- runif(50, 0, 1)
y <- rbeta(50, 1, 2)
bootstrapMI(x, y, bRep=100)
z <- matrix(rnorm(100, 0, 1), 4, 25)
bootstrapMI(z, bRep=100)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(maigesPack)
Loading required package: convert
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: limma
Attaching package: 'limma'
The following object is masked from 'package:BiocGenerics':
plotMA
Loading required package: marray
Loading required package: graph
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/maigesPack/bootstrapMI.Rd_%03d_medium.png", width=480, height=480)
> ### Name: bootstrapMI
> ### Title: Calculate bootstrap p-values for mutual information (MI)
> ### measures
> ### Aliases: bootstrapMI
> ### Keywords: methods
>
> ### ** Examples
>
> x <- runif(50, 0, 1)
> y <- rbeta(50, 1, 2)
> bootstrapMI(x, y, bRep=100)
[1] 0.04
>
> z <- matrix(rnorm(100, 0, 1), 4, 25)
> bootstrapMI(z, bRep=100)
[,1] [,2] [,3] [,4]
[1,] 1.00 0.23 0.81 0.71
[2,] 0.23 1.00 0.37 0.17
[3,] 0.81 0.37 1.00 0.25
[4,] 0.71 0.17 0.25 1.00
>
>
>
>
>
> dev.off()
null device
1
>