btpn: Bimodal truncated positive normal

btpnR Documentation

Bimodal truncated positive normal

Description

Density, distribution function and random generation for the bimodal truncated positive normal (btpn) discussed in Gomez et al. (2022).

Usage

dbtpn(x, sigma, lambda, eta, log = FALSE)
pbtpn(x, sigma, lambda, eta, lower.tail=TRUE, log=FALSE)
rbtpn(n, sigma, lambda, eta)

Arguments

x

vector of quantiles

n

number of observations

sigma

scale parameter for the distribution

lambda

shape parameter for the distribution

eta

shape parameter for the distribution

log

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].

Details

Random generation is based on the stochastic representation of the model, i.e., the product between a tpn (see Gomez et al. 2018) and a dichotomous variable assuming values -(1+\epsilon) and 1-\epsilon with probabilities (1+\epsilon)/2 and (1-\epsilon)/2, respectively.

Value

dbtpn gives the density, pbtpn gives the distribution function and rbtpn generates random deviates.

The length of the result is determined by n for rbtpn, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

A variable have btpn distribution with parameters \sigma>0, \lambda \in R and \eta \in R if its probability density function can be written as

f(y; \sigma, \lambda, q) = \frac{\phi\left(\frac{x}{\sigma(1+\epsilon)}+\lambda\right)}{2\sigma\Phi(\lambda)}, y<0,

and

f(y; \sigma, \lambda, q) = \frac{\phi\left(\frac{x}{\sigma(1-\epsilon)}-\lambda\right)}{2\sigma\Phi(\lambda)}, y\geq 0,

where \epsilon=\eta/\sqrt{1+\eta^2} and \phi(\cdot) and \Phi(\cdot) denote the probability density function and the cumulative distribution function for the standard normal distribution, respectively.

Author(s)

Gallardo, D.I., Gomez, H.J. and Gomez, Y.M.

References

Gomez, H.J., Caimanque, W., Gomez, Y.M., Magalhaes, T.M., Concha, M., Gallardo, D.I. (2022) Bimodal Truncation Positive Normal Distribution. Symmetry, 14, 665.

Gomez, H.J., Olmos, N.M., Varela, H., Bolfarine, H. (2018). Inference for a truncated positive normal distribution. Applied Mathemetical Journal of Chinese Universities, 33, 163-176.

Examples

dbtpn(c(1,2), sigma=1, lambda=-1, eta=2)
pbtpn(c(1,2), sigma=1, lambda=-1, eta=2)
rbtpn(n=10, sigma=1, lambda=-1, eta=2)

tpn documentation built on Sept. 28, 2023, 1:06 a.m.

Related to btpn in tpn...