Learn R Programming

coxsei (version 0.3)

Dens: 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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab