Learn R Programming

fastml (version 0.7.5)

compute_ibrier: Compute Integrated Brier Score and Curve

Description

Calculates the Brier score at specified evaluation times and the Integrated Brier Score (IBS) up to \(\tau\), using IPCW to handle censoring.

Usage

compute_ibrier(eval_times, surv_mat, time_vec, status_vec, tau, censor_eval_fn)

Value

A list with ibs (the scalar IBS value) and curve (a numeric vector of Brier scores at eval_times).

Arguments

eval_times

Numeric vector of evaluation time points.

surv_mat

Matrix of predicted survival probabilities (rows=subjects, cols=eval_times).

time_vec

Numeric vector of test times.

status_vec

Numeric vector of test statuses.

tau

The time horizon \(\tau\) for integration.

censor_eval_fn

A function (from create_censor_eval) that evaluates the censoring survival function \(G(t)\).