Skip to contents

Score vector for the Weibull AFT log-likelihood extended to left-, right-, and interval-censored responses (see TODO-3 in interval_censored_survival_response.md). Exactly one of y[i] or (y_L[i], y_R[i]) must be finite per subject: NA in the unused slot(s).

Usage

get_weibull_regression_general_score_cpp(X, y, y_L, y_R, params)

Arguments

X

A numeric matrix of predictors.

y

Exact survival times, NA for censored subjects.

y_L

Censored-interval lower bounds, NA for exact subjects; 0 for left-censored.

y_R

Censored-interval upper bounds, NA for exact subjects; Inf for right-censored.

params

A numeric vector of parameters [beta, log_sigma].

Value

A numeric vector representing the score.