Learn R Programming

HuraultMisc (version 1.1.1)

empirical_pval: Compute empirical p-values

Description

Compute empirical p-values

Usage

empirical_pval(t_rep, t, alternative = c("two.sided", "less", "greater"))

Arguments

t_rep

Vector of samples from a distribution.

t

Observation (numeric scalar).

alternative

Indicates the alternative hypothesis: must be one of "two.sided", "greater" or "less".

Value

Empirical p-value.

Examples

Run this code
# NOT RUN {
empirical_pval(rnorm(1e2), 2)
# }

Run the code above in your browser using DataLab