find.H: Calculate the cumulative hazard function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/find.H.R

Description

This function calculates the cumulative hazard function at location t based on input from either find.shapeCPH or find.shapeMLE.

Usage

1
find.H(t, h.val, h.ranges)

Arguments

t

time at which to evaluate the cumulative hazard (must be univariate)

h.val

vector specifying changes of values in the hazard baseline MLE (output from e.g. find.shapeCPH)

h.ranges

vector specifying locations of changes in values in the hazard baseline MLE (output from e.g. find.shapeCPH)

Value

A number giving the value of the estimated cumulative hazard at t.

Author(s)

Rihong Hui and Hanna Jankowski <hkj@mathstat.yorku.ca>

See Also

find.shapeCPH find.shapeMLE

Examples

1
2
3
4
5
6
7
8
9
# random sample from the uniform density
n	<-	500
x	<-	runif(n)

# compute MLE of increasing hazard
mle	<-	find.shapeMLE(x, type="increasing")

# find fitted cumulative hazard function at t=0.2
find.H(0.2, mle$h.val, mle$h.range)

CPHshape documentation built on May 30, 2017, 4:32 a.m.