fdr_envelope: The FDR envelope

View source: R/fdr.r

fdr_envelopeR Documentation

The FDR envelope

Description

Calculate the FDR envelope based on the ATSE or IATSE algorithm of Mrkvička and Myllymäki (2022).

Usage

fdr_envelope(
  curve_sets,
  alpha = 0.05,
  alternative = c("two.sided", "less", "greater"),
  algorithm = c("IATSE", "ATSE"),
  lower = NULL,
  upper = NULL
)

Arguments

curve_sets

A curve_set (see create_curve_set) or an envelope object of spatstat containing the observed function and the functions from which the envelope is to be constructed. Alternatively, a list of appropriate objects can be given.

alpha

The significance level. The 100(1-alpha)% global envelope will be calculated. If a vector of values is provided, the global envelopes are calculated for each value.

alternative

A character string specifying the alternative hypothesis. Must be one of the following: "two.sided" (default), "less" or "greater". The last two options only available for types 'rank', 'erl', 'cont' and 'area'.

algorithm

Either "IATSE" or "ATSE" standing for the iteratively adaptive two-stage envelope and the adaptive two-stage envelope, respectively, see Mrkvička and Myllymäki (2022).

lower

A single number (or a vector of suitable length) giving a lower bound for the functions. Used only for the extension, see Mrkvička and Myllymäki (2022, p. 6).

upper

A single number (or a vector of suitable length) giving an upper bound for the functions.

References

Mrkvička and Myllymäki (2022). False discovery rate envelopes. arXiv:2008.10108 [stat.ME]

Examples

# A GLM example
data(rimov)
nsim <- 1000 # Number of simulations

res <- graph.flm(nsim=nsim,
                 formula.full = Y~Year,
                 formula.reduced = Y~1,
                 typeone = "fdr",
                 curve_sets = list(Y=rimov),
                 factors = data.frame(Year = 1979:2014))
plot(res)


GET documentation built on Nov. 16, 2022, 5:09 p.m.