Learn R Programming

eventPred (version 0.2.6)

llik_pwexp: Log likelihood for piecewise exponential regression

Description

Obtains the log likelihood value for piecewise exponential regression.

Usage

llik_pwexp(theta, time, event, J, tcut, q, x)

Value

The log likelihood value for piecewise exponential regression.

Arguments

theta

The parameter vector consisting of gamma for log piecewise hazards and beta for regression coefficients.

time

The survival time.

event

The event indicator.

J

The number of time intervals.

tcut

A vector that specifies the endpoints of time intervals for the baseline piecewise exponential survival distribution. Must start with 0, e.g., c(0, 60) breaks the time axis into 2 event intervals: [0, 60) and [60, Inf). By default, it is set to 0.

q

The number of columns of the covariates matrix.

x

The covariates matrix (excluding the intercept).