smle_resid {smlePH}R Documentation

Extract residuals of the full likelihood proportional hazards model

Description

This function extracts residuals of the full likelihood proportional hazards model estimated by the sieve estimation. Deviance-type and score-type residuals are available.

Usage

smle_resid(y, d, x, fit, type = c("score", "deviance"))

Arguments

y

survival time (> 0).

d

right-censoring indicator, 1: observed; 0: right-censored.

x

p-dimensional covariates matrix.

fit

an object comes from the function smle_ph.

type

type of residual, either deviance or score.

Details

see Halabi et al., (2024+) for detailed method explanation.

Value

smle_resid returns a numeric vector (if type = "deviance") or a matrix (if type = "score") of residuals extracted from the object.

References

Halabi et al., (2024+) Sieve maximum full likelihood estimation for the proportional hazards model

Examples


library(smlePH)
# The 'fit' comes from an example description of smle_ph()
smle_resid(y = y, d = d, x = x, fit = fit, type = "deviance")
smle_resid(y = y, d = d, x = x, fit = fit, type = "score")

[Package smlePH version 0.1.0 Index]