Skip to content

Commit 05347b6

Browse files
committed
rob added logistic+cox features
1 parent 5dcf3e2 commit 05347b6

File tree

8 files changed

+28
-558
lines changed

8 files changed

+28
-558
lines changed

selectiveInference/NAMESPACE

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
export(lar,fs,
2-
larInf,fsInf,fsInf_maxZ,
2+
larInf,fsInf,
33
coef.lar,coef.fs,
44
predict.lar,predict.fs,
55
print.lar,print.fs,
66
print.larInf,print.fsInf,
77
plot.lar,plot.fs,
88
fixedLassoInf,print.fixedLassoInf,
9-
# fixedLogitLassoInf,print.fixedLogitLassoInf,
10-
# fixedCoxLassoInf,print.fixedCoxLassoInf,
9+
# fixedLogitLassoInf,print.fixedLogitLassoInf,
10+
# fixedCoxLassoInf,print.fixedCoxLassoInf,
1111
forwardStop,
1212
estimateSigma,
1313
manyMeans,print.manyMeans,
1414
groupfs,groupfsInf,
15-
scaleGroups,factorDesign,
16-
sample_from_constraints
15+
scaleGroups,factorDesign
1716
)
1817

1918
S3method("coef", "lar")
@@ -26,7 +25,6 @@ S3method("predict", "fs")
2625
S3method("print", "fs")
2726
S3method("plot", "fs")
2827
S3method("print", "fsInf")
29-
S3method("print", "fsInf_maxZ")
3028
S3method("print", "fixedLassoInf")
3129
S3method("print", "fixedLogitLassoInf")
3230
S3method("print", "fixedCoxLassoInf")
@@ -37,8 +35,9 @@ S3method("print", "groupfsInf")
3735
useDynLib("selectiveInference")
3836
import(glmnet)
3937
import(intervals)
38+
import(survival)
4039
importFrom("graphics", abline, axis, matplot)
41-
importFrom("stats", dnorm, lsfit, pexp, pnorm, predict,
40+
importFrom("stats", dnorm, lsfit, pexp, pnorm, predict,
4241
qnorm, rnorm, sd, uniroot, dchisq, model.matrix, pchisq)
4342
importFrom("stats", "coef", "df", "lm", "pf")
4443

selectiveInference/R/funs.constraints.R

Lines changed: 0 additions & 186 deletions
This file was deleted.

selectiveInference/R/funs.fixedCox.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if( sum(status==0)+sum(status==1)!=length(y)) stop("status vector must have valu
2525
vars=which(m)
2626
if(sum(m)>0){
2727
bhat=beta[beta!=0] #penalized coefs just for active variables
28-
s2=sign(bhat)
28+
s2=sign(bhat)
2929

3030
#check KKT
3131

selectiveInference/R/funs.fixedLogit.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fixedLogitLassoInf=function(x,y,beta,lambda,alpha=.1, type=c("partial"), tol.bet
7474
b1= (s2 * dbeta)[-1]
7575

7676
tol.poly = 0.01
77-
if (max((A1 %*% bbar)[-1] - b1) > tol.poly)
77+
if (max((A1 %*% bbar) - b1) > tol.poly)
7878
stop(paste("Polyhedral constraints not satisfied; you must recompute beta",
7979
"more accurately. With glmnet, make sure to use exact=TRUE in coef(),",
8080
"and check whether the specified value of lambda is too small",

0 commit comments

Comments
 (0)