nhard.threshold.est: Hard-threshold estimators.

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

Description

Hard-threshold estimators based on the raw estimates of the log fold change and their p-values.

Usage

1
2
3
4
5
nhard.threshold.est(x, y = NULL, opt = c("fold.change","twer", "fwer", "lfdr",
    "lfdr0", "lfdr1"), alpha = 0.05, pval.fun = t.test, arglis.pvalfun = list(),
    alternative = "two.sided", ...)

nfc.threshold.est(x, y = NULL, threshold = 0.5, ...)

Arguments

x

Input data matrix: features(rows) x samples (columns). See examples.

y

Optional input data matrix.

opt

Option for selecting the type of estimator, it is a character:

"fold.change"

estimator based on the log of the raw estimated fold change (can use function nfc.threshold.est instead)

"twer"

estimator based on the raw p-value that controls test-wise error rate (TWER).

"fwer"

estimator based on the adjusted p-value that controls family-wise error rate (FWER) from multtest package.

"lfdr"

estimator based on the Efrons local false discovery rate (LFDR) from locfdr package.

alpha

Hard threshold value for the general function nhard.threshold.est.

threshold

Hard threshold value for function nfc.threshold.est.

pval.fun

Function to compute p-values from the input data. Usually: "t.test", "wilcox.test", etc.

alternative

Argument for input function pval.fun, type of p-values to be computed: "less", "greater", "two-sided" (see stats R package).

arglis.pvalfun

Further arguments for the input function pval.fun (see stats R package).

...

Arguments to pass to function mt.rawp2adjp (for opt = FWER), locfdr (for opt = LFDR) or to another internal function.

Value

A vector of length equal to the total number of features (i.e. proteins, genes,...).

Author(s)

Code: Zahra Montazeri, Corey M. Yanofsky, David R. Bickel and Marta Padilla (modifications)
Documentation: Alaa Ali and Marta Padilla

References

Montazeri, Z., Yanofsky, C. M., & Bickel, D. R. (2010). Shrinkage estimation of effect sizes as an alternative to hypothesis testing followed by estimation in high-dimensional biology: Applications to differential gene expression. Statistical Applications in Genetics and Molecular Biology, 9, 23.

See Also

multtest and locfdr packages.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#simulate some data sets: matrices of log-abundance levels
nsam<-10        #number of individuals
nfeat<-40       #number of features (metabolites, genes,...)
diffs<-c(1:7)   #features with differential log-abundance levels
lfc<-5          #differential quantity

# create data sets:
x <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #case
y <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #control
x[diffs,] <- x[diffs,] + lfc

# hard threshold estimator on fold change: ----------
z1 <- nhard.threshold.est(x=x,y=y,alpha=0.3,opt="fold.change")
z2 <- nfc.threshold.est(x=x,y=y,threshold=0.5)

# other options: -----
z4 <- nhard.threshold.est(x=x,y=y,pval.fun=t.test,opt="TWER")
z5 <- nhard.threshold.est(x=x,y=y,alpha=0.05,opt="FWER")     
z6 <- nhard.threshold.est(x=x,y=y,pval.fun=wilcox.test,opt="LFDR")

Shrinkage documentation built on Sept. 12, 2016, 9:41 a.m.