Description Usage Arguments Details Value Author(s) References Examples
Computes the ForwardStop sequential stopping rule of G'Sell et al (2014)
1 | forwardStop(pv, alpha=0.1)
|
pv |
Vector of **sequential** p-values, for example from fsInf or larInf |
alpha |
Desired type FDR level (between 0 and 1) |
Computes the ForwardStop sequential stopping rule of G'Sell et al (2014). Guarantees FDR control at the level alpha, for independent p-values.
Step number for sequential stop.
Ryan Tibshirani, Rob Tibshirani, Jonathan Taylor, Joshua Loftus, Stephen Reid
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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)
|
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
Loaded glmnet 2.0-16
Loading required package: intervals
Attaching package: 'intervals'
The following object is masked from 'package:Matrix':
expand
Loading required package: survival
Call:
fsInf(obj = fsfit)
Standard deviation of noise (specified or estimated) sigma = 1.027
Sequential testing results with alpha = 0.100
Step Var Coef Z-score P-value LowConfPt UpConfPt LowTailArea UpTailArea
1 1 2.317 13.406 0.000 2.019 2.605 0.049 0.048
2 2 1.703 12.996 0.000 1.486 1.922 0.048 0.050
3 9 -0.265 -1.683 0.487 -0.782 1.152 0.050 0.050
4 8 -0.175 -1.156 0.260 -4.764 1.532 0.050 0.050
5 10 0.173 1.075 0.755 -12.195 3.056 0.050 0.050
6 4 -0.178 -1.140 0.407 -11.057 7.428 0.050 0.050
7 7 0.158 0.979 0.763 -9.225 2.137 0.050 0.050
8 5 0.128 0.896 0.838 -6.737 0.737 0.050 0.050
9 6 -0.036 -0.225 0.303 -Inf Inf 0.000 0.000
10 3 0.037 0.255 0.121 -1.478 Inf 0.050 0.000
Estimated stopping point from ForwardStop rule = 2
[1] 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.