bayesEst: Obtains the Bayes estimator for each atom considered.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/bayesEst.R

Description

This function inputs the estimated quantities obtained from errDisc (EFD, EMD, EFDR, EMDR) and outputs the non-overlapping sets (atoms) in the Bayes estimator.

Usage

1
2
3
bayesEst(EFD.EMD, w, type = "count", pen.for.feats =
0, pen.for.atoms = 0, atom.sizes = EFD.EMD[,"EFD"]/EFD.EMD[,"EFDR"],
ilim = 10, verbose = TRUE)

Arguments

EFD.EMD

Matrix with estimated EFD, EMD, EFDR, EMDR for each of the non-overlapping sets (atoms) in the Bayes estimator (output of the errDisc function.)

w

Value of threshold used to determine whether or not an atom is in the Bayes estimator.

type

Either "count" or "ratio", depending on whether the loss function is based on the EFD and EMD or on the EFDR and EMDR.

pen.for.feats

Penalty for the number of features in the Bayes estimator.

pen.for.atoms

Penalty for the number of atoms in the Bayes estimator.

atom.sizes

Vector of the number of genes in each atom.

ilim

Number of iterations performs to obtain Bayes estimator in ratio case.

verbose

If TRUE, displays intermediate messages for ratio case.

Value

Vector of the atoms in the Bayes estimator.

Author(s)

Hector Corrada Bravo, Simina M. Boca, Jeffrey T. Leek

References

Boca S.M., H. Corrada Bravo, B. Caffo, J.T. Leek, and G. Parmigiani (2010): A decision-theory approach to interpretable set analysis for high-dimensional data, JHU Biostat Working Paper 211, http://www.bepress.com/jhubiostat/paper211/

See Also

postProb, errDisc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
##first obtain estimates of the gene-level posterior probabilities
data(GenderStats)
data(ChromSets)

gene.stat <- (gene.stat - mean(gene.stat))/sd(gene.stat)
set.seed(70790707)
post.prob.genes <- postProb(gene.stat, null = rnorm(20 * length(gene.stat),
+ 0, 1), K = length(gene.stat))

##now run errDisc function
EFD.EMD.res <- errDisc(sets, post.prob.genes)
head(EFD.EMD.res)

##now get Bayes estimator in various cases
bayesEst(EFD.EMD.res, w = 0.75, type = "count", atom.sizes =
sapply(sets, length))
bayesEst(EFD.EMD.res, w = 0.97, type = "count", atom.sizes =
sapply(sets, length))

bayesEst(EFD.EMD.res, w = 0.75, type = "count", atom.sizes =
sapply(sets, length), pen.for.feats = 0.2)
bayesEst(EFD.EMD.res, w = 0.97, type = "count", atom.sizes =
sapply(sets, length), pen.for.feats = 0.2)

bayesEst(EFD.EMD.res, w = 0.75, type = "count", atom.sizes =
sapply(sets, length), pen.for.atoms = 5)
bayesEst(EFD.EMD.res, w = 0.97, type = "count", atom.sizes =
sapply(sets, length), pen.for.atoms = 5)

bayesEst(EFD.EMD.res, w = 0.75, type = "ratio", atom.sizes =
sapply(sets, length))

leekgroup/Set documentation built on May 20, 2019, 11:30 p.m.