Learn R Programming

selectiveInference (version 1.2.5)

forwardStop: ForwardStop rule for sequential p-values

Description

Computes the ForwardStop sequential stopping rule of G'Sell et al (2014)

Usage

forwardStop(pv, alpha=0.1)

Arguments

pv

Vector of **sequential** p-values, for example from fsInf or larInf

alpha

Desired type FDR level (between 0 and 1)

Value

Step number for sequential stop.

Details

Computes the ForwardStop sequential stopping rule of G'Sell et al (2014). Guarantees FDR control at the level alpha, for independent p-values.

References

Max Grazier G'Sell, Stefan Wager, Alexandra Chouldechova, and Rob Tibshirani (2014). Sequential selection procedures and Fflse Discovery Rate Control. arXiv:1309.5352. To appear in Journal of the Royal Statistical Society: Series B.

Examples

Run this code
# NOT RUN {
set.seed(33)
n = 50
p = 10
sigma = 1
x = matrix(rnorm(n*p),n,p)
beta = c(3,2,rep(0,p-2))
y = x%*%beta + sigma*rnorm(n)

# run forward stepwise
fsfit = fs(x,y)

# compute sequential p-values and confidence intervals
# (sigma estimated from full model)
out = fsInf(fsfit)
out

# estimate optimal stopping point
forwardStop(out$pv, alpha=.10)
# }

Run the code above in your browser using DataLab