Skip to content

Commit 57d91d4

Browse files
changing order of stops
2 parents 2917d6e + 63e60df commit 57d91d4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

selectiveInference/R/funs.fixed.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ debiasingRow = function (Xinfo, # could be X or t(X) %*% X / n dep
453453
objective_tol,
454454
parameter_tol,
455455
max_active,
456-
objective_stop,
457456
kkt_stop,
457+
objective_stop,
458458
parameter_stop)
459459
} else {
460460
result = solve_QP_wide(Xinfo, # this is a design matrix
@@ -471,8 +471,8 @@ debiasingRow = function (Xinfo, # could be X or t(X) %*% X / n dep
471471
objective_tol,
472472
parameter_tol,
473473
max_active,
474-
objective_stop,
475474
kkt_stop,
475+
objective_stop,
476476
parameter_stop)
477477

478478
}

selectiveInference/R/funs.fixedCox.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ b1= -(mydiag(sign_bhat)%*%MM)%*%sign_bhat*lambda
7373
vup[jj]=junk$vup
7474
sd[jj]=junk$sd
7575

76-
junk2=TG.interval(bbar, A1, b1, vj, MM, alpha)
76+
junk2=TG.interval(bbar, A1, b1, vj, MM, alpha, flip=(sign_bhat[jj]==-1))
7777
ci[jj,]=junk2$int
7878
tailarea[jj,] = junk2$tailarea
7979

selectiveInference/R/funs.fixedLogit.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fixedLogitLassoInf=function(x,y,beta,lambda,alpha=.1, type=c("partial"), tol.bet
9696
vup[jj]=junk$vup
9797
sd[jj]=junk$sd
9898

99-
junk2=TG.interval(bbar, A1, b1, vj, MM,alpha=alpha)
99+
junk2=TG.interval(bbar, A1, b1, vj, MM,alpha=alpha, flip=(sign_bhat[jj+1]==-1))
100100

101101
ci[jj,]=junk2$int
102102
tailarea[jj,] = junk2$tailarea

selectiveInference/src/Rcpp-debias.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Rcpp::List solve_QP(Rcpp::NumericMatrix Sigma,
1717
double objective_tol,
1818
double parameter_tol,
1919
int max_active,
20-
int objective_stop,
2120
int kkt_stop,
21+
int objective_stop,
2222
int param_stop
2323
) {
2424

@@ -55,8 +55,8 @@ Rcpp::List solve_QP(Rcpp::NumericMatrix Sigma,
5555
objective_tol,
5656
parameter_tol,
5757
max_active,
58-
objective_stop,
5958
kkt_stop,
59+
objective_stop,
6060
param_stop);
6161

6262
// Check whether feasible
@@ -96,8 +96,8 @@ Rcpp::List solve_QP_wide(Rcpp::NumericMatrix X,
9696
double objective_tol,
9797
double parameter_tol,
9898
int max_active,
99-
int objective_stop,
10099
int kkt_stop,
100+
int objective_stop,
101101
int param_stop
102102
) {
103103

@@ -148,8 +148,8 @@ Rcpp::List solve_QP_wide(Rcpp::NumericMatrix X,
148148
objective_tol,
149149
parameter_tol,
150150
max_active,
151-
objective_stop,
152151
kkt_stop,
152+
objective_stop,
153153
param_stop);
154154

155155
// Check whether feasible

0 commit comments

Comments
 (0)