truncation point (this may a single value or a vector).
statistic
type of statistic - normal, correlation, or student t.
Details
As null model truncated normal, truncated student t or a truncated
correlation density is assumed. The truncation point is specified
by the cutoff parameter. All data points whose absolute value
are large than the cutoff point are ignored when fitting the truncated
null model via maximum likelihood. The total number of data points is
only used to estimate the fraction of null values eta0.
Value
censored.fit returns a matrix whose rows contain the estimated parameters and corresponding errors
for each cutoff point.
fndr.cutoff returns a tentative cutoff point.
See Also
fdrtool.
Examples
# load "fdrtool" library
library("fdrtool")
# simulate normal data
sd.true = 2.232
n = 5000
z = rnorm(n, sd=sd.true)
censored.fit(z, c(2,3,5), statistic="normal")
# simulate contaminated mixture of correlation distribution
r = rcor0(700, kappa=10)
u1 = runif(200, min=-1, max=-0.7)
u2 = runif(200, min=0.7, max=1)
rc = c(r, u1, u2)
censored.fit(r, 0.7, statistic="correlation")
censored.fit(rc, 0.7, statistic="correlation")
# pvalue example
data(pvalues)
co = fndr.cutoff(pvalues, statistic="pvalue")
co
censored.fit(pvalues, cutoff=co, statistic="pvalue")