hazard: hazard

Description Usage Arguments Value Examples

View source: R/hazard.R

Description

This function calculates instant hazard

Usage

1
hazard(D, nf, nk, ncl, dist, vpar, ID)

Arguments

D

A data.frame in which to interpret the variables named in the formula. The data set includes the following fields:

  1. time-to-failure and censoring in the case without left truncation or time-of-start, time-of-failure, and censoring in the case with left truncation at the time of begin (censoring must be either 0 for no event or 1 for event);

  2. Covariates (continuous or categorical) used in a study (can be empty set).

nf

The number of continuous and binary factors in the data set D corresponding to the covariates used in the Cox-regression for proportional hazard term.

nk

The number of continuous and binary factors in the data set D corresponding to the covariates used in the Cox-regression for shape b.

ncl

The number of clusters in the data set D corresponding to the cluster covariate. Is equal to 0 for the fixed-effect model).

dist

Baseline hazard function ('Weibull' or 'Gompertz').

vpar

The sample of the vector-row-parameters in matrix form.

ID

The order number of an object in the data set.

Value

Instant hazard for the object with order number ID

Examples

1
2
3
4
## Not run: 
hazard(D,nf,nk,ncl,dist,vpar,ID)

## End(Not run)

AB5103/doubleCoxr documentation built on Feb. 20, 2022, 2:20 p.m.