manyMeans {selectiveInference}R Documentation

Selective inference for many normal means

Description

Computes p-values and confidence intervals for the largest k among many normal means

Usage

manyMeans(y, alpha=0.1, bh.q=NULL, k=NULL, sigma=1, verbose=FALSE)

Arguments

y

Vector of outcomes (length n)

alpha

Significance level for confidence intervals (target is miscoverage alpha/2 in each tail)

bh.q

q parameter for BH(q) procedure

k

Number of means to consider

sigma

Estimate of error standard deviation

verbose

Print out progress along the way? Default is FALSE

Details

This function compute p-values and confidence intervals for the largest k among many normal means. One can specify a fixed number of means k to consider, or choose the number to consider via the BH rule.

Value

mu.hat

Vector of length n containing the estimated signal sizes. If a sample element is not selected, then its signal size estimate is 0

selected.set

Indices of the vector y of the sample elements that were selected by the procedure (either BH(q) or top-K). Labelled "Selind" in output table.

pv

P-values for selected signals

ci

Confidence intervals

method

Method used to choose number of means

sigma

Value of error standard deviation (sigma) used

bh.q

BH q-value used

k

Desired number of means

threshold

Computed cutoff

call

The call to manyMeans

Author(s)

Ryan Tibshirani, Rob Tibshirani, Jonathan Taylor, Joshua Loftus, Stephen Reid

References

Stephen Reid, Jonathan Taylor, and Rob Tibshirani (2014). Post-selection point and interval estimation of signal sizes in Gaussian samples. arXiv:1405.3340.

Examples

set.seed(12345)
n = 100 
mu = c(rep(3,floor(n/5)), rep(0,n-floor(n/5))) 
y = mu + rnorm(n)
out = manyMeans(y, bh.q=0.1)
out

[Package selectiveInference version 1.2.5 Index]