weighted.LR: Weighted Lehmann-Romano Procedure

Description Usage Arguments Details Value See Also Examples

View source: R/weightedLR_fun.R

Description

Apply the weighted [wLR] procedure, with or without computing the critical values, to a set of p-values. Both arithmetic and geometric weighting are available.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
weighted.LR(
  raw.pvalues,
  weights,
  alpha = 0.05,
  zeta = 0.5,
  weighting.method = "AM",
  critical.values = FALSE
)

wLR.AM(raw.pvalues, weights, alpha = 0.05, zeta = 0.5, critical.values = FALSE)

wLR.GM(raw.pvalues, weights, alpha = 0.05, zeta = 0.5, critical.values = FALSE)

Arguments

raw.pvalues

vector of the raw observed p-values, as provided by the end user and before matching with their nearest neighbor in the CDFs supports.

weights

a numeric vector. Contains the weights of the p-values.

alpha

the target FDP, a number strictly between 0 and 1. For *.fast kernels, it is only necessary, if stepUp = TRUE.

zeta

the target probability of not exceeding the desired FDP, a number strictly between 0 and 1. If zeta=NULL (the default), then zeta is chosen equal to alpha.

weighting.method

a character string specifying whether to conduct arithmetic (direction="AM", the default) or geometric weighting (direction="GM") of p-values.

critical.values

a boolean. If TRUE, critical constants are computed and returned (this is computationally intensive).

Details

wLR.AM and wLR.GM are wrapper functions for weighted.LR. The first one simply passes all its parameters to weighted.LR with weighting.method = "AM" and wLR.GM does the same with weighting.method = "GM".

Value

A FDX S3 class object whose elements are:

Rejected

Rejected raw p-values.

Indices

Indices of rejected hypotheses.

Num.rejected

Number of rejections.

Adjusted

Adjusted p-values (only for step-down direction).

Weighted

Weighted p-values.

Critical.values

Critical values (if requested).

Method

A character string describing the used algorithm, e.g. 'Discrete Lehmann-Romano procedure (step-up)'.

FDP.threshold

FDP threshold alpha.

Exceedance.probability

Probability zeta of FDP exceeding alpha; thus, FDP is being controlled at level alpha with confidence 1 - zeta.

Weighting

A character string describing the weighting method.

Data$raw.pvalues

The values of raw.pvalues.

Data$weights

The values of weights.

Data$data.name

The respective variable names of raw.pvalues and pCDFlist.

See Also

kernel, FDX-package, continuous.LR, continuous.GR, discrete.LR, discrete.GR, discrete.PB, weighted.GR, weighted.PB

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Construction of the p-values and their supports for weighted methods
raw.pvalues.weighted <- c(0.7389727, 0.1882310, 0.1302457, 0.9513677,
                         0.7592122, 0.0100559, 0.0000027, 0.1651034)
weights <- c(0.7947122, 1.2633867, 2.8097858, 2.2112801,
            2.3878654, 1.2389620, 2.3878654, 0.7947122)

wLR.AM.fast <- wLR.AM(raw.pvalues.weighted, weights)
summary(wLR.AM.fast)

wLR.AM.crit <- wLR.AM(raw.pvalues.weighted, weights, critical.values = TRUE)
summary(wLR.AM.crit)

wLR.GM.fast <- wLR.GM(raw.pvalues.weighted, weights)
summary(wLR.GM.fast)

wLR.GM.crit <- wLR.GM(raw.pvalues.weighted, weights, critical.values = TRUE)
summary(wLR.GM.crit)

FDX documentation built on Nov. 26, 2020, 1:07 a.m.