search for: selectedbeta

Displaying 3 results from an estimated 3 matches for "selectedbeta".

2013 Dec 07
1
combine glmnet and coxph (and survfit) with strata()
...ta() effect in the model in glmnet? I tried converting a formula with strata() to a design matrix and feeding to glmnet, but glmnet just treats the strata() term with one independent variable... I know that if there is no such strata(), I can estimate coefficients from glmnet and use "...init=selectedBeta,iter=0)" in the coxph. Please advise me or also correct me if I'm wrong. Thank you very much! Best, Jieyue [[alternative HTML version deleted]]
2012 May 07
1
estimating survival times with glmnet and coxph
....5,maxit=10000) # find lambda for which dev.ratio is max max.dev.index???? <- which.max(fit$dev.ratio) optimal.lambda <- fit$lambda[max.dev.index] # take beta for optimal lambda optimal.beta? <- fit$beta[,max.dev.index] # find non zero beta coef nonzero.coef <- abs(optimal.beta)>0 selectedBeta <- optimal.beta[nonzero.coef] # take only covariates for which beta is not zero selectedTrainX?? <- trainX[,nonzero.coef] # create coxph object with pre-defined coefficients coxph.model<- coxph(Surv(trainTime,trainStatus) ~selectedTrainX,init=selectedBeta,iter=0) Warning message: In cox...
2013 Jul 06
1
problem with BootCV for coxph in pec after feature selection with glmnet (lasso)
....ratio is max max.dev.index <- which.max(glmnet.obj$dev.ratio) optimal.lambda <- glmnet.obj$lambda[max.dev.index] # take beta for optimal lambda optimal.beta <- glmnet.obj$beta[,max.dev.index] # find non zero beta coef nonzero.coef <- abs(optimal.beta)>0 selectedBeta <- optimal.beta[nonzero.coef] # take only covariates for which beta is not zero selectedVar <- predict_matrix[,nonzero.coef] # create a dataframe for trainSet with time, status and selected variables in binary representation for evaluation in pec reformat_dataSet <- as.d...