Learn R Programming

DiscreteDists (version 1.1.3)

PTRTE: Poisson-transmuted record type exponential distribution

Description

The function PTRTE() defines the Poisson-transmuted record type exponential distribution, a two-parameter discrete distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

Usage

PTRTE(mu.link = "log", sigma.link = "logit")

Value

Returns a gamlss.family object that can be used to fit the Poisson-transmuted record type exponential distribution using the gamlss() function.

Arguments

mu.link

defines the link function for the mu parameter, with "log" as the default.

sigma.link

defines the link function for the sigma parameter, with "logit" as the default.

Author

Rebeca Isabel Rodriguez Gonzalez, rebeca.rodriguez@udea.edu.co

Details

The Poisson-transmuted record type exponential distribution with parameters \(\mu\) and \(\sigma\) has support \(x = 0,1,2,\dots\) and probability mass function given by

$$f(x | \mu, \sigma) = \frac{\mu}{(1+\mu)^{x+1}} \left(\frac{\sigma \mu (1+x)}{1+\mu} - (\sigma-1) \right)$$

Parameter restrictions: \(\mu > 0\) and \(0 < \sigma < 1\).

Note: we renamed the original parameters \(\theta\) and \(p\) to \(\mu\) and \(\sigma\) respectively to implement this distribution within the gamlss framework.

References

Erbayram, T., & Akdogan, Y. (2025). A new discrete model generated from mixed Poisson transmuted record type exponential distribution. Ricerca di Matematica, 74, 1225–1247.

See Also

dPTRTE.

Examples

Run this code
# Example 1
# Generating some random values with known mu and sigma
# logit_inv function
logit_inv <- function(x) exp(x) / (exp(x)+1)

set.seed(12345)
y <- rPTRTE(n=200, mu=0.2, sigma=0.5)

# Fitting the model
library(gamlss)
mod1 <- gamlss(y~1, family=PTRTE)

# Extracting the fitted values for mu and sigma
exp(coef(mod1, what="mu"))
logit_inv(coef(mod1, what="sigma"))

# Example 2
# Generating random values under some model
# A function to simulate a data set with Y ~ PTRTE

gendat <- function(n) {
  x1 <- runif(n)
  x2 <- runif(n)
  mu    <- exp(2 + 1 * x1) # 12 approximately
  sigma <- logit_inv(2 - 2 * x2) # 0.73 approximately
  y <- rPTRTE(n=n, mu=mu, sigma=sigma)
  data.frame(y=y, x1=x1, x2=x2)
}

set.seed(12345)
dat <- gendat(n=2000)

# Fitting the model
mod2 <- NULL
mod2 <- gamlss(y~x1, sigma.fo=~x2, family=PTRTE, data=dat,
               control=gamlss.control(n.cyc=500, trace=FALSE))

summary(mod2)

# Example 3 (Second data set of the article)
# European corn-borer count data reported by McGuire et al. (1957).
# The observed and fitted frequencies are given in Table 11 of
# Erbayram and Akdogan (2025), where the P-TRTE distribution is
# illustrated using this data set.

values <- 0:5
freq <- c(188, 83, 36, 14, 2, 1)

y <- rep(x=values, times=freq)

mod3 <- gamlss(y~1, sigma.fo=~1, family=PTRTE(),
               control=gamlss.control(n.cyc=500, trace=TRUE))

exp(coef(mod3, what="mu"))
logit_inv(coef(mod3, what="sigma"))

Run the code above in your browser using DataLab