Dens {coxsei}R Documentation

Density function

Description

Evaluate the density function corresponding to the specified intensity/hazard function int.

Usage

Dens(x, int, ...)

Arguments

x

the value at which to evaluate the density function

int

the intensity/hazard function. Has to be vectorized.

...

other arguments to be passed to the underlying integrator

Value

A numerical value or vector giving the value(s) of the density function

Note

Relies on R's integrate function

Author(s)

Feng Chen <feng.chen@unsw.edu.au>

Examples

set.seed(1); dat <- RND(1000,int=function(x)3*x^2)
hist(dat,freq=FALSE); curve(Dens(x,int=function(x)3*x^2),add=TRUE)

[Package coxsei version 0.3 Index]