Package 'TLCAR'

Title: Computation of Topp-Leone Cauchy Rayleigh (TLCAR ) distribution's properties
Description: Provides a comprehensive suite of statistical tools for analyzing, simulating, and computing properties of the Topp-Leone Cauchy Rayleigh (TLCAR) distribution, a versatile distribution amalgamating features of the Topp-Leone, Cauchy, and Rayleigh distributions, ideal for modeling intricate, heterogeneous data across scientific domains. See Atchadé, M.N., Bogninou, M.J., and Djibril, A.M. (2023) <doi:10.1007/s44199-023-00066-4> and Atchadé, M.N., Bogninou, M.J., and Djibril, A.M. (2024) <doi:10.1007/s44199-023-00069-1> for further insights.
Authors: Mintodê Nicodème Atchadé [aut], Jude Mahoulé Bogninou [aut, cre]
Maintainer: Jude Mahoulé Bogninou <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2025-02-14 04:41:36 UTC
Source: https://github.com/cran/TLCAR

Help Index


Dataset: ConductorFailureTimes

Description

This dataset contains failure times measured in hours from an accelerated life test with 59 conductors.

Usage

data(ConductorFailureTimes)

Format

A numeric vector of failure times.

Details

This dataset contains failure times (measured in hours) obtained from an accelerated life test involving 59 conductors. The data are presented as a numeric vector.

References

Nasiri, B., et al. (2010). "Bayesian analysis of the accelerated life model with Type-II censoring." Journal of Statistical Planning and Inference, 140(6), 1565-1572.

Schafft, H. A., et al. (1987). "Reproducibility of the accelerated test for electric cable insulation." IEEE Transactions on Electrical Insulation, 22(5), 739-746.


Cumulative Distribution Function (CDF) for the TLCAR Distribution

Description

Calculate the cumulative distribution at a given value using the TLCAR distribution.

Usage

cTLCAR(x, alpha, a, b, theta, m)

Arguments

x

Value at which to calculate the CDF.

alpha

Parameter representing the distribution of the Topp-Leone component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

theta

Parameter representing the scale of the Rayleigh component.

m

Additional parameter.

Details

The cumulative distribution function (CDF) for the TLCAR distribution is defined as follows:

F(x)=[1(121πarctanx(1ex22θ2+m)ba)2]αF(x)=\left[ 1-\left(\frac{1}{2}-\frac{1}{\pi}\arctan\frac{x\left(1-e^{-\frac{x^2}{2\theta^2}}+m\right) -b}{a}\right)^2\right]^\alpha

Value

Cumulative distribution at the given value.

Examples

cTLCAR(x = 1, alpha = 1, a = 1, b = 0, theta = 2, m = 0.5)

Probability Density Function (PDF) for the TLCAR Distribution

Description

Calculate the probability density at a given value using the TLCAR distribution.

Usage

dTLCAR(x, alpha, a, b, theta, m)

Arguments

x

Value at which to calculate the PDF.

alpha

Parameter representing the distribution of the Topp-Leone component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

theta

Parameter representing the scale of the Rayleigh component.

m

Additional parameter.

Details

The probability density function (PDF) for the TLCAR distribution is defined as follows:

f(x)=2απa[1+(x2θ21)ex22θ2+m1+(x(1ex22θ2+m)ba)2][121πarctanx(1ex22θ2+m)ba][1(121πarctanx(1ex22θ2+m)ba)2]α1f(x)=\frac{2\alpha}{\pi a}\left[\frac{1+\left(\frac{x^2}{\theta^2}-1\right)e^{-\frac{x^2}{2\theta^2}}+m}{1+\left(\frac{x\left(1-e^{-\frac{x^2}{2\theta^2}}+m\right) -b}{a}\right)^2}\right]\left[\frac{1}{2}-\frac{1}{\pi}\arctan\frac{x\left(1-e^{-\frac{x^2}{2\theta^2}}+m\right) -b}{a}\right]\left[ 1-\left(\frac{1}{2}-\frac{1}{\pi}\arctan\frac{x\left(1-e^{-\frac{x^2}{2\theta^2}}+m\right)-b}{a}\right)^2\right]^{\alpha-1}

Value

Probability density at the given value.

Examples

dTLCAR(x = 1, alpha = 1, a = 1, b = 0, theta = 2, m = 0.5)

Estimate parameters for the TLCAR distribution using maximum likelihood.

Description

This function estimates the parameters of the TLCAR distribution while respecting the constraints on the parameters.

Usage

fTLCAR(data)

Arguments

data

Numeric vector of data values.

Value

Numeric vector of estimated parameters.

Examples

data(ConductorFailureTimes)
estimated_params <- fTLCAR(ConductorFailureTimes)

Graphical Plot of the TLCAR Distribution

Description

Generate a graphical plot of the probability density function (PDF) or cumulative distribution function (CDF) for the TLCAR distribution.

Usage

ploTLCAR(x, alpha, a, b, theta, m, type = "pdf")

Arguments

x

The range of values to plot the distribution.

alpha

Parameter representing the distribution of the Topp-Leone component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

theta

Parameter representing the scale of the Rayleigh component.

m

Additional parameter.

type

The type of plot to generate: "pdf" for PDF plot, "cdf" for CDF plot.

Value

A graphical plot of the TLCAR distribution.

Examples

ploTLCAR(x = seq(0, 10, by = 0.1), alpha = 0.5, a = 1, b = 0, theta = 2, m = 1, type = "pdf")

Quantile function for TLCAR distribution

Description

Calculate the quantile value for a given probability using the TLCAR distribution.

Usage

qTLCAR(p, alpha, a, b, theta, m)

Arguments

p

Probability value (between 0 and 1).

alpha

Parameter representing the distribution of the Topp-Leone component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

theta

Parameter representing the scale of the Rayleigh component.

m

Additional parameter.

Value

Numeric value representing the quantile.

Examples

qTLCAR(p = 0.5, alpha = 1, a = 1, b = 0, theta = 3, m = 1)

Generate a random sample from the TLCAR distribution

Description

Generate a random sample from the TLCAR distribution using the quantile function.

Usage

rTLCAR(n, alpha, a, b, theta, m)

Arguments

n

Number of observations in the sample.

alpha

Parameter representing the distribution of the Topp-Leone component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

theta

Parameter representing the scale of the Rayleigh component.

m

Additional parameter.

Value

Random sample from the TLCAR distribution.

Examples

# Generate a random sample with 100 observations using estimated parameters
sample <- rTLCAR(n = 100, alpha = 1, a = 1, b = 0, theta = 3, m = 1)

Estimate parameters with constraints and plot histogram with estimated density

Description

This function estimates the parameters of the TLCAR distribution while respecting the constraints on the parameters. It plots the histogram of the data along with the estimated density curve.

Usage

sTLCAR(data)

Arguments

data

Numeric vector of data values.

Value

Numeric vector of estimated parameters.

Examples

data(ConductorFailureTimes)
sTLCAR(ConductorFailureTimes)

Temporary Variable Calculation

Description

This function calculates a temporary variable used in the TLCAR distribution density function.

Usage

temp_var(x, theta, a, b, m)

Arguments

x

Numeric vector of values at which to calculate the temporary variable.

theta

Parameter representing the scale of the Rayleigh component.

a

Parameter representing the scale (a) of the Cauchy component.

b

Parameter representing the position (b) of the Cauchy component.

m

Additional parameter.

Value

Numeric vector of calculated temporary variable values


Dataset: Tree_diameters

Description

This dataset contains tree diameter measurements (in cm) for Teak trees in the Agrimey sector in Benin.

Usage

data(Tree_diameters)

Format

A numeric vector of tree diameter measurements (in cm).