Description Usage Arguments Value References See Also Examples
Compute false discovery proportion for estimated change-points, see (Li et al., 2015) for a detailed explanation.
1 | computeFdp(u, eJ)
|
u |
true signal; a numeric vector |
eJ |
estimated change-points; a numeric vector |
A scalar takes value in [0, 1].
Li, H., Munk, A., and Sieling, H. (2015). FDR-control in multiscale change-point segmentation. arXiv:1412.5844.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # simulate data
set.seed(2)
u0 <- c(rep(1, 50), rep(5, 50))
Y <- rnorm(100, u0)
# compute FDRSeg
uh <- fdrseg(Y)
plot(Y, pch = 20, col = "grey", xlab = "", ylab = "")
lines(u0, type = "s", col = "blue")
lines(evalStepFun(uh), type = "s", col = "red")
legend("topleft", c("Truth", "FDRSeg"), lty = c(1, 1), col = c("blue", "red"))
# compute false discovery proportion
fdp <- computeFdp(u0, uh$left)
cat("False discovery propostion is ", fdp, "\n")
|
False discovery propostion is 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.