Description Usage Arguments Details Value Note Examples
View source: R/presense_absense.R
A function for testing the significance in differences of presence/absence patterns.
1 2 3 4 5 6 | eset_presence_absence(
eset,
grouping,
test = c("fisher", "chisq", "g", "binom"),
...
)
|
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) |
The recommended way of using the test is two-group comparison. All except "binom" options will work for larger number of groups.
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.
see also http://www.ncbi.nlm.nih.gov/pubmed/20831241
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.