mc.pvalue {smerc} | R Documentation |
Compute Monte Carlo p-value
Description
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)
.
Usage
mc.pvalue(tobs, tsim)
Arguments
tobs |
A vector observed test statistics |
tsim |
A vector of test statistics from simulated data |
Value
A vector of p-values.
Examples
mc.pvalue(8:10, 1:9)
[Package smerc version 1.8.4 Index]