Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y_primary=cbind(data$mortality, data$death)
- colnames(y_primary)=c("time","status")
- x_covariates = subset(data, select=-c(mortality, death)))
- x_covariate = model.matrix(~., x_covariates)
- cvfit = cv.glmnet(x_covariate, y_primary, family="cox")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement