pval: Obtain P-value from a vector of values

View source: R/shared.support.code.r

pvalR Documentation

Obtain P-value from a vector of values

Description

A function to find the probability of values greater or lesser than target, from a vector of values presumably obtained in random permutations.

Usage

pval(s, target = NULL, greater = TRUE)

Arguments

s

The sampling distribution vector to use.

target

The value to target in the distribution. (If null, the first value in the vector is used.). If the target exists outside the range of s, a probability of 0 or 1 is certain.

greater

Logical value for whether the probability should be "greater than or equal to". Change to greater = FALSE for "less than or equal to".

Author(s)

Michael Collyer


RRPP documentation built on June 22, 2024, 6:45 p.m.