gen.p.values: Generate one-sided p-values associated to a given signal with...

View source: R/tree-simulation-functions.R

gen.p.valuesR Documentation

Generate one-sided p-values associated to a given signal with equi-correlated noise

Description

Generate one-sided p-values associated to a given signal with equi-correlated noise

Usage

gen.p.values(
  m,
  mu = rep(0, m),
  rho = 0,
  alternative = c("two.sided", "less", "greater")
)

Arguments

m

An integer value, the number of hypotheses

mu

A vector of m signal values

rho

A numeric value in [0,1], the level of equi-correlation between test statistics

alternative

A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less".

Value

A vector of m one-sided p-values

Examples

m <- 100
s <- 10
K1 <- floor(m/(s * 4))
d <- 1
barmu <- 4
dd <- dyadic.from.window.size(m, s, method = 2)
leaf_list <- dd$leaf_list
mu <- gen.mu.leaves(m = m, K1 = K1, d = d, grouped = FALSE, 
                    setting = "const", barmu = barmu, leaf_list =leaf_list)
pvals <- gen.p.values(m = m, mu = mu, rho = 0)
plot(-log(pvals), t = 'b')

pneuvial/sanssouci documentation built on July 4, 2025, 3:16 p.m.