Learn R Programming

tsdistributions (version 1.0.2)

dspd: Semi-Parametric Distribution

Description

Density, distribution, quantile function and random number generation for the semi parametric distribution (spd) which has generalized Pareto tails and kernel fitted interior.

Usage

dspd(x, object, linear = TRUE, log = FALSE)

pspd(q, object, linear = TRUE, lower_tail = TRUE)

qspd(p, object, linear = TRUE, lower_tail = TRUE)

rspd(n, object, linear = TRUE)

Value

d gives the density, p gives the distribution function, q gives the quantile function and r generates random deviates. Output depends on x or q length, or n for the random number generator.

Arguments

x, q

vector of quantiles.

object

an object of class “tsdistribution.spdestimate” returned from calling estimate.tsdistribution.spdspec.

linear

logical, if TRUE (default) interior smoothing function uses linear interpolation rather than constant.

log

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

lower_tail

if TRUE (default), probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\).

p

vector of probabilities.

n

Number of observations.