mc.pvalue: Compute Monte Carlo p-value

View source: R/mc.pvalue.R

mc.pvalueR 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)

smerc documentation built on Oct. 13, 2022, 9:07 a.m.