powered by
This function computes the p-value of a statistic using a simulated sample from its theoretical null distribution.
pval_simu(s, theo_dist)
the observation whose p-value is computed. For instance a Likelihood Ratio.
the sample of the distribution under the null hypothesis.
The p-value associated to the observation s.
s
rchisqmix
# NOT RUN { if(interactive()){ theo_dist <- rnorm(n=10000, mean=0, sd=1) TcGSA:::pval_simu(s=1.96, theo_dist) 1-pnorm(q=1.96, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) } # }
Run the code above in your browser using DataLab