glmnetHazard: Compute predicted hazard for glmnet

View source: R/glmnetHazard.R

glmnetHazardR Documentation

Compute predicted hazard for glmnet

Description

This code is borrowed from internal function agsurv from survival package.

Usage

glmnetHazard(
  y,
  x = NULL,
  wt = rep(1, NROW(y)),
  risk = NULL,
  survtype = NULL,
  vartype = NULL
)

Arguments

object

fitted glmnetsurv object.

Value

A list of S3 objects.

n

number of observations used in the fit.

events

total number of events of interest in the fit.

time

time points defined by the risk set.

n.risk

the number of individuals at risk at time t.

n.event

the number of events that occur at time t.

n.censor

the number of subjects who exit the risk set, without an event, at time t.

surv

a vector or a matrix of estimated survival function.

chaz, hazard

a vector or a matrix of estimated cumulative hazard.


CYGUBICKO/glmnetpostsurv documentation built on Sept. 1, 2022, 7:26 p.m.