auc.hqm: AUC for the High Quality Marker estimator

View source: R/auc.hqm.R

auc.hqmR Documentation

AUC for the High Quality Marker estimator

Description

Calculates the AUC for the HQM estimator.

Usage

auc.hqm(xin, est, landm, th, event_time_name, status_name)

Arguments

xin

A data frame containing event times and the patient status.

est

The HQM estimator values, typically the output of get_h_x.

landm

Landmark time.

th

Time horizon.

event_time_name

The column name of the event times in the xin data frame.

status_name

The column name of the status variable in the xin frame.

Details

The function auc.hqm implements the AUC calculation for the HQM estimator estimator.

Value

A vector of two values: the landmark time of the calculation and the AUC value.

See Also

bs.hqm

Examples

library(timeROC)
library(survival)
Landmark <- 2
pbcT1 <- pbc2[which(pbc2$year< Landmark  & pbc2$years> Landmark),]
ls<-50 # 50 grid points to evaluate the estimates
s.out<- pbcT1[, 'year']
s.out.use <-  seq(0, max(s.out), max(s.out)/( ls-1))
 
timesS2 <- seq(Landmark,14,by=0.5)
b=0.9
arg1<- get_h_x(pbcT1, 'albumin', br_s = s.out.use,  event_time_name = 'years',  
                time_name = 'year', event_name = 'status2', 2, 0.9) 
br_s2  = seq(Landmark, 14,  length=ls-1)
sfalb2<- make_sf(    (br_s2[2]-br_s2[1])/4 , arg1)
tHor <- 1.5
auc.hq.use<-auc.hqm(pbcT1, sfalb2, Landmark,tHor,  
              event_time_name = 'years', status_name = 'status2')
auc.hq.use

HQM documentation built on Jan. 8, 2026, 9:08 a.m.

Related to auc.hqm in HQM...