kpmt {kpmt} | R Documentation |
Known Population Median Test
Description
Performs the known population median test.
Usage
kpmt(pop, obs = NULL, med = NULL, size = NULL, tail = "two-sided",
verbose = FALSE)
Arguments
pop |
[data frame, matrix, vector] numeric values for the whole population. If a data frame or matrix is given, it should have format:
For a data frame or matrix, the test will be performed on each column, separately. If a named vector is given, it should have format:
|
obs |
[character vector or named list of character vectors] a character vector of population member names, or a named list of character vectors of population member names.
|
med |
[number or vector] pre-computed minimal medians of pop. |
size |
[integer] size of the set which generated the observed median. If obs is a sample, i.e. contains population member names, then size must be NULL. |
tail |
["two-sided", "lower", "upper"] if NULL, then the minimum of lower and upper will be reported. |
verbose |
display extra messages for tracking execution. |
Value
data frame with columns:
"name" a column from pop
"median.sample" min median of the sample
"median.all" min median of the whole population
"median.background" min median of the non-sampled members.
"logp" log of p.value if sample median is different from all
"p.value" p.value if sample median is different from all
"FDR" only if > 30 features, i.e columns of pop
each row is a different population feature, i.e. column of pop.
Examples
data(genefeat)
data(GO0007186)
res <- kpmt( pop = genefeat , obs = GO0007186 )