How to run survival analysis on big dataset? I have recently been involved in a project that needs me to analyze the survival time of objects. Therefore, I plan to use the rms package to build a Cox model. The problem is, since the dataset I have is so big (about 450,000 instances, and each has 9 covariables), the R environment fails to handle this. Does anyone have suggestions as to how to fit these models?
 A: You can try the survival package in R-core.
library(survival)
fit <- coxph(V1+V2, data=data)

Not sure how it compares to rms.
A: logistic regression might be one way to go. given the construction, you need to add time variables (most likely in spline form) into the model setup, the it can give you hazard ratio as well.
in practice, logistic regression will yield similar answer to cox model -- in many cases, even more stable.
A: Using h2o is an option now: Cox PH function is available with nightly build (in R only) and soon to be released with 3.20.x version. You can monitor this feature here: PUBDEV-5019
Obviously, with R you would need to install h20 package by following instructions in 'INSTALL IN R' link above (copied below for clarity):
# The following two commands remove any previously installed H2O packages for R.
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }

# Next, we download packages that H2O depends on.
pkgs <- c("RCurl","jsonlite")
for (pkg in pkgs) {
  if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
}

# Now we download, install and initialize the H2O package for R.
install.packages("h2o", type="source", repos="var url = location.href; var url2 = url.substring(0, url.lastIndexOf("/")); document.write(url2);http://h2o-release.s3.amazonaws.com/h2o/master/4305/R")

# Finally, let's load H2O and start up an H2O cluster
library(h2o)
h2o.init()

Now, running survival model with h2o would be as straight forward as with survival package:
lung.hex = as.h2o(survival::lung)

covariates = c("age", "sex",  "ph.karno", "ph.ecog", "wt.loss")
lung.coxph.model = h2o.coxph(x=covariates, event_column = "status", training_frame = lung.hex,
stop_column = "time")

# print model coefficients
lung.coxph.model@model$coefficients_table

The code Cox PH above is equivalent to survival code:
res.cox <- coxph(Surv(time, status) ~ age + sex + ph.karno + ph.ecog + wt.loss, data =  lung)
summary(res.cox)

