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)

jpfrench81/smerc documentation built on Jan. 13, 2024, 4:30 a.m.