Learn R Programming

Colossus (version 1.2)

RunCoxNull: Performs basic Cox Proportional Hazards regression with the null model

Description

RunCoxRegression uses user provided data and time/event columns to calculate the log-likelihood with constant hazard ratio

Usage

RunCoxNull(
  df,
  time1 = "start",
  time2 = "end",
  event0 = "event",
  control = list()
)

Value

returns a list of the final results

Arguments

df

a data.table containing the columns of interest

time1

column used for time period starts

time2

column used for time period end

event0

column used for event status

control

list of parameters controlling the convergence, see Def_Control() for options or vignette("Control_Options")

See Also

Other Cox Wrapper Functions: CoxCurveSolver(), RunCoxRegression(), RunCoxRegression_Basic(), RunCoxRegression_CR(), RunCoxRegression_Guesses_CPP(), RunCoxRegression_Omnibus(), RunCoxRegression_Omnibus_Multidose(), RunCoxRegression_Single(), RunCoxRegression_Strata(), RunCoxRegression_Tier_Guesses()

Examples

Run this code
library(data.table)
## basic example code reproduced from the starting-description vignette
df <- data.table::data.table(
  "UserID" = c(112, 114, 213, 214, 115, 116, 117),
  "Starting_Age" = c(18, 20, 18, 19, 21, 20, 18),
  "Ending_Age" = c(30, 45, 57, 47, 36, 60, 55),
  "Cancer_Status" = c(0, 0, 1, 0, 1, 0, 0)
)
# For the interval case
time1 <- "Starting_Age"
time2 <- "Ending_Age"
event <- "Cancer_Status"
control <- list(
  "ncores" = 2, "verbose" = FALSE, "ties" = "breslow",
  "double_step" = 1
)
e <- RunCoxNull(df, time1, time2, event, control)

Run the code above in your browser using DataLab