# 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)
# estimate sigma
sigmahat = estimateSigma(x,y)$sigmahat
# run sequential inference with estimated sigma
out = fsInf(fsfit,sigma=sigmahat)
out
# }
Run the code above in your browser using DataLab