Skip to content

Commit 222fc7c

Browse files
BF: correcting the conditioning for FS
1 parent e887312 commit 222fc7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

selectiveInference/R/funs.fs.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ fs <- function(x, y, maxsteps=2000, intercept=TRUE, normalize=TRUE,
132132
# Gamma matrix!
133133
if (gi + 2*p > nrow(Gamma)) Gamma = rbind(Gamma,matrix(0,2*p+gbuf,n))
134134
working_x = t(sign_score*t(working_x))
135-
Gamma[gi+Seq(1,p-r),] = t(working_x); gi = gi+p-r
135+
136+
Gamma[gi+Seq(1,p-r-1),] = t(working_x[,i_hit]+working_x[,-i_hit]); gi = gi+p-r-1
136137
Gamma[gi+Seq(1,p-r-1),] = t(working_x[,i_hit]-working_x[,-i_hit]); gi = gi+p-r-1
137138
Gamma[gi+1,] = t(working_x[,i_hit]); gi = gi+1
138139

0 commit comments

Comments
 (0)