Learn R Programming

neodistr (version 0.1.2)

msnburr2a: MSNBurr-IIa distribution.

Description

To calculate density function, distribution function, quantile function, and build data from random generator function for the MSNBurr distribution.

Usage

dmsnburr2a(x, mu = 0, sigma = 1, alpha = 1, log = FALSE)

pmsnburr2a(q, mu = 0, sigma = 1, alpha = 1, lower.tail = TRUE, log.p = FALSE)

qmsnburr2a(p, mu = 0, sigma = 1, alpha = 1, lower.tail = TRUE, log.p = FALSE)

rmsnburr2a(n, mu = 0, sigma = 1, alpha = 1)

Value

dmsnburr2a gives the density, pmsnburr2a gives the distribution function, qmsnburr2a gives the quantile function and rmsnburr2a generates random numbers.

Arguments

x, q

vector of quantiles.

mu

a location parameter.

sigma

a scale parameter.

alpha

a shape parameter

log, log.p

logical; if TRUE, probabilities p are given as log(p), The default value of this parameter is FALSE.

lower.tail

logical;if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).

p

vectors of probabilities.

n

number of observations.

Author

Achmad Syahrul Choir and Nur Iriawan

Details

MSNBurr-IIa Distribution

The MSNBurr-IIa distribution with parameters \(\mu\), \(\sigma\), and \(\alpha\) has density: $$f(x |\mu,\sigma,\alpha)=\frac{\omega}{\sigma}\exp{\left(\omega{\left(\frac{x-\mu}{\sigma}\right)}\right)}{{\left(1+\frac{\exp{\left(\omega{(\frac{x-\mu}{\sigma})}\right)}}{\alpha}\right)}^{-(\alpha+1)}}$$ where \(-\infty < x < \infty, -\infty < \mu< \infty, \sigma>0, \alpha>0, \omega = \frac{1}{\sqrt{2\pi}} {\left(1+\frac{1}{\alpha}\right)^{\alpha+1}}\)

References

Choir, A. S. (2020). The New Neo-Normal Distributions and their Properties. Dissertation. Institut Teknologi Sepuluh Nopember.

Examples

Run this code
library("neodistr")
dmsnburr2a(7, mu=0, sigma=1, alpha=0.1)
plot(function(x) dmsnburr2a(x, alpha=0.1), -3, 20,
main = "Right Skew MSNBurr-IIa Density ",ylab="density")
p=pmsnburr2a(4, mu=0, sigma=1, alpha=1)
p
q=qmsnburr2a(p, mu=0, sigma=1, alpha=1)
q
qmsnburr2a(0.5, mu=0, sigma=1, alpha=1)
r=rmsnburr2a(10000, mu=0, sigma=1, alpha=0.1)
head(r)
hist(r, xlab = 'MSNBurr random number', ylab = 'Frequency', 
main = 'Distribution of MSNBurr-IIa Random Number ')

Run the code above in your browser using DataLab