polygram: The Polygram Class of Distributions

Description Usage Arguments Details Value

View source: R/estimation.R

Description

Density, distribution function, random generation, and pth derivative of the density for a polygram distribution object.

Usage

1
2
3
4
5
6
7
dxpolygram(x, object, p = 1, log = FALSE)

dpolygram(x, object, log = FALSE)

ppolygram(q, object, lower.tail = TRUE, log.p = FALSE)

rpolygram(n, object)

Arguments

x, q

vector of quantiles.

object

A polygram object.

p

vector of probabilities.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[x≤X] otherwise, P[X<x].

n

number of observations. If codelength(n) > 1, the length is taken to be the number required.

Details

A Bernstein polygram on [a, b] is disjoint mixture of rescaled Bernstein densities on subintervals of [a, b]. Such polygrams can be used for non-parametric density estimation as an alternative to logsplines and kernel density estimation.

Value

dbernstein gives the density, pbernstein the distribution function, qbernstein the quantile function, rbeta generates random deviates, and dxbernstein gives the pth derivative of the density function.


JonasMoss/polygrams documentation built on Nov. 8, 2019, 5:19 p.m.