Dens: Density function

Description Usage Arguments Value Note Author(s) Examples

View source: R/Dens.R

Description

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

Usage

1
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

1
2
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)

coxsei documentation built on Feb. 8, 2020, 9:07 a.m.