Skip to content

Commit dc4bff6

Browse files
partial to selected, match.arg for type
1 parent e16aeb0 commit dc4bff6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

selectiveInference/R/funs.randomized.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,13 @@ conditional_opt_transform = function(noise_scale,
331331
}
332332

333333
compute_target = function(rand_lasso_soln,
334-
type,
334+
type=c("selected", "full"),
335335
sigma_est=1,
336336
construct_pvalues=NULL,
337337
construct_ci=NULL){
338338

339+
type = match.arg(type)
340+
339341
# compute internal representation of the data
340342
y = rand_lasso_soln$y
341343
X = rand_lasso_soln$X
@@ -356,7 +358,7 @@ compute_target = function(rand_lasso_soln,
356358
glm_cov = vcov(glm_y)
357359
}
358360

359-
if (type=="partial"){
361+
if (type=="selected"){
360362

361363
observed_target = as.vector(glm_y$coefficients)
362364
cov_target = glm_cov

0 commit comments

Comments
 (0)