Computes the partial log-likelihood for a univariate Cox proportional hazards model. Handles ties using either the Breslow or Efron approximation.
Arguments
- x
Numeric vector of length
n: covariate values for each individual.- y
Numeric matrix of shape
n × 2, where: -y[,1]contains event/censoring times -y[,2]contains event status (1 = event, 0 = censored)- theta
Numeric scalar: the coefficient to evaluate the log-likelihood at.
- offset
Numeric vector of length
n, or scalar. Optional offset in the linear predictor.- ties
Character string: tie-handling method. Must be either
"breslow"or"efron".