It's always refreshing to meet a fellow R hacker on HN!
May I ask you why you chose to use the normal distribution in your example or any distribution at all, for that matter? What I was replying to was
">they only test null hypothesis that are true."
Which means that the null hypothesis is always true no matter what data you collect trying to reject it. It does not depend on the null distribution (normal in your example), the value of the test statistic (the mean of the sample in your example), or the threshold (crit in your example). In fact, the null distribution in this case is not a distribution at all since there's no randomness in the null hypothesis. We know for a fact that it is always true (in the hypothetical situation we are considering).
It's more like
> rep(FALSE, simulations) # is the null hypothesis false? nope
or, if you insist on using the normal distribution,
> abs(colMeans(sapply(rep(n, simulations), rnorm))) > +Inf
In fact, in your example, since you are essentially running 1000 hypothesis tests on different samples, multiple hypothesis correction would solve the "problem" with p-value. This is how I would do it.
> n <- 50
> simulations <- 10000
> x <- sapply(rep(n, simulations), rnorm)
> p <- sapply(apply(x, 2, FUN=t.test), function(tt) tt$p.value)
> pa <- p.adjust(p, method="fdr")
> library(boot)
> boot.out <- boot(pa, function(d, i) mean(d[i]), R=1000)
> boot.ci(boot.out, conf=0.95, type="basic")
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 1000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out, type = "basic")
Intervals :
Level Basic
95% ( 0.9774, 0.9780 )
Calculations and Intervals on Original Scale
P.S. p-values are great when used appropriately.