eset_presence_absence: Presence/Absence Testing

Description Usage Arguments Details Value Note Examples

View source: R/presense_absense.R

Description

A function for testing the significance in differences of presence/absence patterns.

Usage

1
2
3
4
5
6
eset_presence_absence(
  eset,
  grouping,
  test = c("fisher", "chisq", "g", "binom"),
  ...
)

Arguments

eset

eset (or most likely eset subclass) object

grouping

character defining the column in phenoData

test

character: Fisher exact test, χ^2, G-test or binomial.

...

other aruments to pass to the test functions (e.g. simulate.p.value = TRUE)

Details

The recommended way of using the test is two-group comparison. All except "binom" options will work for larger number of groups.

Value

data.frame

p.value

p-value

effect

difference between second and first group (according to the factor levels). In case of larger number of levels, it is the absolute value of the max diffence

...

proportions of present for each group. Column names are level names.

Note

see also http://www.ncbi.nlm.nih.gov/pubmed/20831241

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library("MSnbase")
Nsam = 20
Npep = 5
M <- matrix(rbinom(Nsam*Npep, 1, 0.5), ncol=Nsam)
pd <- data.frame(group = gl(2, Nsam/2))
fd <- data.frame(otherfdata = letters[1:Npep])
x0 <- MSnSet(M, fd, pd)
eset_presence_absence(x0, 'group', test='fisher')
eset_presence_absence(x0, 'group', test='chisq', simulate.p.value=TRUE)
eset_presence_absence(x0, 'group', test='g')
eset_presence_absence(x0, 'group', test='binom')

vladpetyuk/vp.misc documentation built on June 25, 2021, 6:35 a.m.