Skip to content

Commit de103f7

Browse files
removing useC
1 parent 3a46ad8 commit de103f7

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

selectiveInference/R/funs.fixed.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ sigma=NULL, alpha=0.1,
159159
hsigmaSinv <- solve(hsigmaS) # pinv(hsigmaS)
160160

161161
# Approximate inverse covariance matrix for when (n < p) from lasso_Inference.R
162-
useC = TRUE
163-
htheta <- InverseLinfty(hsigma, n, length(S), verbose=FALSE, useC=useC)
162+
htheta <- InverseLinfty(hsigma, n, length(S), verbose=FALSE)
164163
# htheta <- InverseLinfty(hsigma, n, verbose=FALSE)
165164

166165
FS = rbind(diag(length(S)),matrix(0,pp-length(S),length(S)))
@@ -270,7 +269,7 @@ fixedLasso.poly=
270269
### Functions borrowed and slightly modified from lasso_inference.R
271270

272271
## Approximates inverse covariance matrix theta
273-
InverseLinfty <- function(sigma, n, e, resol=1.5, mu=NULL, maxiter=50, threshold=1e-2, verbose = TRUE, useC = FALSE) {
272+
InverseLinfty <- function(sigma, n, e, resol=1.5, mu=NULL, maxiter=50, threshold=1e-2, verbose = TRUE) {
274273
# InverseLinfty <- function(sigma, n, resol=1.5, mu=NULL, maxiter=50, threshold=1e-2, verbose = TRUE) {
275274
isgiven <- 1;
276275
if (is.null(mu)){
@@ -295,12 +294,7 @@ InverseLinfty <- function(sigma, n, e, resol=1.5, mu=NULL, maxiter=50, threshold
295294
incr <- 0;
296295
while ((mu.stop != 1)&&(try.no<10)){
297296
last.beta <- beta
298-
useC = FALSE
299-
if (useC == FALSE) {
300-
output <- InverseLinftyOneRow(sigma, i, mu, maxiter=maxiter, threshold=threshold)
301-
} else {
302-
output <- InverseLinftyOneRowC(sigma, i, mu, maxiter=maxiter)
303-
}
297+
output <- InverseLinftyOneRow(sigma, i, mu, maxiter=maxiter, threshold=threshold)
304298
beta <- output$optsol
305299
iter <- output$iter
306300
if (isgiven==1){

0 commit comments

Comments
 (0)