hatvalues.ddhazard: Hat Values for ddhazard Object

View source: R/hatvalues.R

hatvalues.ddhazardR Documentation

Hat Values for ddhazard Object

Description

Computes hat-"like" values from usual L2 penalized binary regression.

Usage

## S3 method for class 'ddhazard'
hatvalues(model, ...)

Arguments

model

a fit from ddhazard.

...

not used.

Details

Computes hat-"like" values in each interval for each individual at risk in the interval. See the vignette("ddhazard", "dynamichazard") vignette for details.

Value

A list of matrices. Each matrix has three columns: the hat values, the row number of the original data point and the id the row belongs to.

See Also

ddhazard

Examples

library(dynamichazard)
fit <- ddhazard(
 Surv(time, status == 2) ~ log(bili), pbc, id = pbc$id, max_T = 3000,
 Q_0 = diag(1, 2), Q = diag(1e-4, 2), by = 100,
 control = ddhazard_control(method = "GMA"))
hvs <- hatvalues(fit)
head(hvs[[1]])
head(hvs[[2]])


boennecd/dynamichazard documentation built on Oct. 11, 2022, 2:41 p.m.