piecewise: Piecewise hazards

View source: R/piecewise.R

piecewiseR Documentation

Piecewise hazards

Description

Calculate piecewise hazards, no. of events, and exposure times in each interval indicated by cutpoints.

Usage

piecewise(enter, exit, event, cutpoints)

Arguments

enter

Left interval endpoint

exit

Right interval endpoint

event

Indicator of event

cutpoints

Vector of cutpoints

Details

Exact calculation.

Value

A list with components

events

Vector of number of events

exposure

Vector of total exposure time

intensity

Vector of hazards, intensity == events / exposure

Author(s)

Göran Broström

See Also

perstat


goranbrostrom/eha documentation built on June 19, 2024, 1:39 a.m.