Performs the known population median test.
kpmt(pop, obs = NULL, med = NULL, size = NULL, tail = "two-sided",
verbose = FALSE)
[data frame, matrix, vector] numeric values for the whole population. If a data frame or matrix is given, it should have format:
rownames = population member names (e.g. gene names)
colnames = features to test (e.g. relative codon usage, UTR length, MFE, etc.)
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:
names = population member names.
values = numeric values of the feature.
[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.
If obs is a list, then each list element name should correspond to a feature name of pop.
If obs is a vector, then it is considered to be the same sample for each population feature.
if size = NULL, then obs is considered to be a sample of population member names
if size is non-NULL, then obs is considered to be the observed median values per column of pop. (length obs must be equal to number of features in pop)
[number or vector] pre-computed minimal medians of pop.
[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.
["two-sided", "lower", "upper"] if NULL, then the minimum of lower and upper will be reported.
display extra messages for tracking execution.
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.
# NOT RUN {
data(genefeat)
data(GO0007186)
res <- kpmt( pop = genefeat , obs = GO0007186 )
# }
Run the code above in your browser using DataLab