Learn R Programming

UGarima (version 0.1.0)

UGa: The Unit-Garima distribution (UGa)

Description

Density, distribution function, quantile function, and random generation function for UGa distribution with one parameter (theta). See details in references.

Usage

dUGa(x, theta, log = FALSE)

pUGa(q, theta, lower.tail = TRUE, log.p = FALSE)

qUGa(p, theta = 0.5)

rUGa(n, theta)

Value

dUGa gives the density, pUGa gives the distribution function, qUGa gives the quantile function, and rUGa generates random samples.

Arguments

x, q

vector of quantile.

theta

shape parameter, where \(\theta > 0\).

log, log.p

logical; (default = FALSE), if TRUE, then probabilities are given as log(p).

lower.tail

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

p

vector of probabilities.

n

number of observations.

References

Ayuyuen, S., & Bodhisuwan, W. (2024). A generating family of unit-Garima distribution: Properties, likelihood inference, and application. Pakistan Journal of Statistics and Operation Research, 20(1), 69-84. doi:10.18187/pjsor.v20i1.4307.

Examples

Run this code
NULL

x <- seq(0.1,1,by=0.1)
dUGa(x,theta=0.5)           #f(x)
dUGa(x,theta=0.5,log=TRUE)  #log(f(x))

pUGa(x,theta=1.5)                        #P(Xx)

# library(lamW) is required for qUGa() function
x <- seq(0.1,1,by=0.1)
x
p <- pUGa(x,theta=2.5)
p
require(lamW)
q <- qUGa(p,theta=2.5)
q     # q equal to x

# library(lamW) is required for rUGa() function
require(lamW)
x <- rUGa(100,theta=1)
x     #  0

Run the code above in your browser using DataLab