Learn R Programming

cnmlcd (version 1.2-0)

lcd.object: Class lcd

Description

Class lcd is used to store a log-concave density function (f), where the log-density is given by a piecewise linear function.

Arguments

Value

A list consisting of:

alpha

the slope of the log-density before the first interior knot.

C

the normalizing constant.

theta

vector of interior knots.

pi

vector of changes of slope at the interior knots.

lower

lower-boundary knot (L). This should be the smallest observed value.

upper

upper-boundary knot (U). This should be the largest observed value.

coef

a numeric matrix with two rows, with rows 1 and 2 storing, respectively, the intercepts and slopes of the log-density between knots.

fk

density values at the lower boundary (lower) and the interior knots (theta).

dpk

integral of x^o f(x) over each interval between knots for o = 0, 1, 2.

cpk

integral of x^o f(x) over each interval between the lower boundary and each knot.

Details

Given an lcd object, the density function is defined by $$f(x; \alpha, \boldsymbol{\theta}, \boldsymbol{p}, L, U) = \frac{1}{C} e^{\alpha (x-L) - \sum_{j=1}^m p_j(x-\theta_j)_+},\ \ \ \mathrm{for\ } x \in [L, U],$$ where \(C\) is the normalizing constant given by $$C = \int_L^U e^{\alpha (x - L) - \sum_{j=1}^m p_j (x-\theta_j)_+}\;dx$$

coef, fk, dpk and cpk can all worked out from the given parameters. They are computed when a new lcd object is created by function new.lcd() to facilitate computation when the object is used later.

See Also

cnmlcd, plcd, dlcd, new.lcd.