Description Usage Arguments Examples
View source: R/kernelUnitInterval.r
Provide density estimates that are needed by fqvalue
and estimate_fpi0
1 2 3 4 5 6 7 8 9 10 11 12 | kernelUnitInterval(
x,
transformation = "probit",
eval.points = x,
subsample = 1e+05,
cv = FALSE,
epsilon = 1e-15,
epsilon.max = 0.999,
maxk = 100,
trim = 0.02,
...
)
|
x |
Either a vector or a 2-column matrix |
transformation |
Either probit (default), complementary log-log, or identity (not recommended) |
eval.points |
Points at which to evaluate the estimate, default x |
subsample |
Number of points that are randomly subsampled for computing the fit; useful for computational efficiency and for ensuring the density estimation does not run out of memory. NULL means no the fit is performed on all points |
cv |
Whether to use generalized cross-validation to choose the nn (nearest neighbor) smoothing parameter |
epsilon |
How close values are allowed to come to 0 |
epsilon.max |
How close values are allowed to come to 1 |
maxk |
maxk argument passed to locfit |
trim |
In one-dimensional fitting, the very edges often have high variance. This parameter fixes the estimate on the intervals (0, trim) and (1 - trim, 1). |
... |
additional arguments to be passed to lp in locfit, used only if cv=FALSE |
1 2 3 4 5 6 7 8 | set.seed(12)
sim.ttests = simulate_t_tests(m = 1000)
p <- sim.ttests$p
z0 <- sim.ttests$n
z <- rank(z0) / length(z0)
lambda <- 0.3
phi <- as.numeric(p > lambda)
kernelUnitInterval(z[phi == 1], eval.points = z, cv = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.