# load "fdrtool" library
library("fdrtool")
# simulate normal data
sd.true = 2.232
n = 5000
z = rnorm(n, sd=sd.true)
censored.fit(z, 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, statistic="correlation")
censored.fit(rc, statistic="correlation")
Run the code above in your browser using DataLab