basehaz: Baseline hazard

View source: R/coxnet.R

basehazR Documentation

Baseline hazard

Description

Make ⁠[survival::basehaz()]⁠ available for coxnet objects.

Usage

basehaz(fit, ...)

## S3 method for class 'coxph'
basehaz(fit, centered = TRUE, ...)

## S3 method for class 'cv.glmnet'
basehaz(
  fit,
  x,
  y,
  s = c("lambda.1se", "lambda.min"),
  times = NULL,
  centered = TRUE,
  ...
)

## S3 method for class 'coxnet'
basehaz(fit, x, y, s = NULL, times = NULL, centered = TRUE, ...)

Arguments

fit

fitted model.

...

further arguments passed to basehaz.

centered

logical(1), see survival::basehaz().

x

matrix, model matrix used to fit fit.

y

Surv, Survival object used to fit fit.

s

numeric(1), lambda penality parameter.

times

numeric, estimate baseline hazard for times. If NULL all times are returned.

Value

data.frame with variable names hazard, time and optionally strata.

Author(s)

Sebastian Gibb

See Also

survival::basehaz()


ampel-leipzig/ameld documentation built on Aug. 23, 2024, 7:31 p.m.