dempirical: returns the density of an /empirical/

Description Usage Arguments Details Value Examples

View source: R/f3.rbsb4.code.r

Description

This function returns the probability density of an /empirical/ object as a list with two components: w for the discrete part and y for the continuous part associated to different values of the random variable.

Usage

1
dempirical(x, empi)

Arguments

x

Vector of values for which the density is desired.

empi

The empirical object to consider.

Details

the proposed empi is normalized before the computation. So if you don't what that, use by yourself the two functions continuous2density and discrete2density.

Value

A list with two components $w,$y having each the same length as x;

Examples

1
2
 rbsb3k("RESET"); # for R checking compliance (useless)
 dempirical(seq(0, 4, 0.5), new("empirical"));

rbsb documentation built on May 31, 2017, 1:45 a.m.