Data Science Desktop Survival Guide
by Graham Williams |
|||||
Modelling Roles |
# Note the risk variable which measures the severity of the outcome.
risk <- "risk_mm" # Note the identifiers. id <- c("date", "location") # Initialise ignored variables: identifiers. ignore <- c(risk, id) # Remove the variables to ignore. vars <- setdiff(vars, ignore) # Identify the input variables for modelling. inputs <- setdiff(vars, target) %T>% print()
# Also record them by indicies.
inputi <- inputs %>% sapply(function(x) which(x == names(ds)), USE.NAMES=FALSE) %T>% print()
|
form <- formula(ds[rev(vars)])
|