Learn R Programming

MKinfer (version 1.2)

p2ses: Compute SES from p value.

Description

The function computes the SES (standardized effect size) from the p value for permutation/randomisation tests as proposed by Botta-Dukat (2018).

Usage

p2ses(p, alternative = c("two.sided", "less", "greater"))

Value

SES

Arguments

p

numeric vector of p values.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

Author

Matthias Kohl Matthias.Kohl@stamats.de

Details

The function uses the probit transformation (qnorm) to compute an alternative SES based on p values from a permutation/randomization test as proposed by Botta-Dukat (2018) for skewed distributions.

References

Botta-Dukat, Z (2018). Cautionary note on calculating standardized effect size (SES) in randomization test. Community Ecology 19(1), 77-83.

Examples

Run this code
## symmetric case
x <- rnorm(100)
res <- perm.t.test(x)
p2ses(res$p.value)
abs(res$statistic)

## skewed case
x <- rgamma(100, shape = 5)
res <- perm.t.test(x, mu = 5)
p2ses(res$p.value)
abs(res$statistic)

Run the code above in your browser using DataLab