powered by
mc.pvalue computes the Monte Carlo p-value of each element of tobs using the relationship (sum(tsim >= x) + 1)/(nsim + 1) where x is a specific element of tobs and nsim = length(tsim).
mc.pvalue
tobs
(sum(tsim >= x) + 1)/(nsim + 1)
x
nsim = length(tsim)
mc.pvalue(tobs, tsim)
A vector of p-values.
A vector observed test statistics
A vector of test statistics from simulated data
mc.pvalue(8:10, 1:9)
Run the code above in your browser using DataLab