Type: Package
Title: The Folded t Family of Distributions
Version: 1.0
Date: 2026-03-18
Author: Michail Tsagris [aut, cre]
Maintainer: Michail Tsagris <mtsagris@uoc.gr>
Depends: R (≥ 4.0)
Imports: Rfast, stats
Suggests: Rfast2
Description: Maximum likelihood estimation of the folded t and related distributions. The reference paper is: Psarakis and Panaretos (1990). "The folded t distribution". Communications in Statistics–Theory and Methods, 19(7): 2717–2734. <doi:10.1080/03610929008830342>.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2026-03-17 22:10:37 UTC; mtsag
Repository: CRAN
Date/Publication: 2026-03-21 10:20:08 UTC

The folded t family of distributions.

Description

Maximum likelihood estimation of the folded t and related distributions. Probability and density functions, and random generation are also included.

Details

Package: foldedt
Type: Package
Version: 1.0
Date: 2026-03-18
License: GPL-2

Maintainers

Michail Tsagris mtsagris@uoc.gr.

Author(s)

Michail Tsagris mtsagris@uoc.gr.

References

Psarakis and Panaretos (1990). The folded t distribution. Communications in Statistics–Theory and Methods, 19(7): 2717–2734.


Density function of the (non-standardized) folded t distribution

Description

Density function of the (non-standardized) folded t distribution.

Usage

dfoldedt(y, mu, s2, v, logged = FALSE)

Arguments

y

A vector with positive values.

mu

The location parameter, \mu.

s2

The \sigma^2 parameter.

v

The degrees of freedom, v.

logged

If you want the logarithm of the density set this equal to TRUE.

Value

A vector with the (logged) density function values.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Psarakis and Panaretos (1990). The folded t distribution. Communications in Statistics–Theory and Methods, 19(7): 2717–2734.

https://en.wikipedia.org/wiki/Folded-t_and_half-t_distributions

See Also

foldedt.mle

Examples

y <- abs( rt(10, 10, 3) )
dfoldedt(y, mu = 3, s2 = 1, v = 10)

MLE of the folded t distribution

Description

MLE of the folded t distribution.

Usage

foldedt.mle(x)

Arguments

x

A numerical vector with positive real numbers.

Value

A list including:

param

The estimated location and scatter parameters, and the degrees of freedom of the folded t distribution.

loglik

The value of the maximised log-likelihood.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Psarakis and Panaretos (1990). The folded t distribution. Communications in Statistics–Theory and Methods, 19(7): 2717–2734.

https://en.wikipedia.org/wiki/Folded-t_and_half-t_distributions

See Also

halft.mle, halft1.mle, dfoldedt

Examples

x <- abs( rt(1000, 5, 2) )
foldedt.mle(x)

MLE of the half t distribution

Description

MLE of the half t distribution.

Usage

halft.mle(x)

Arguments

x

A numerical vector with positive real numbers.

Details

The half-t distribution with \nu degrees of freedom and scatter parameter \sigma > 0 has density:

f(x) = \frac{2\Gamma\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\,\sigma\,\Gamma\left(\frac{\nu}{2}\right)} \left(1 + \frac{x^2}{\nu\sigma^2}\right)^{-\frac{\nu+1}{2}}, \quad x \geq 0.

Value

A list including:

param

The estimated degrees of freedom and the scatter parameter of the half t distribution.

loglik

The value of the maximised log-likelihood.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Psarakis and Panaretos (1990). The folded t distribution. Communications in Statistics–Theory and Methods, 19(7): 2717–2734.

https://en.wikipedia.org/wiki/Folded-t_and_half-t_distributions

See Also

halft1.mle

Examples

x <- abs( rt(1000, 5) )
halft.mle(x)

MLE of the half t distribution

Description

MLE of the half t distribution with unit scatter parameter.

Usage

halft1.mle(x, tol = 1e-07)

Arguments

x

A numerical vector with positive real numbers.

tol

The tolerance level up to which the maximisation stops set to 1e-07 by default.

Details

The half-t distribution with \nu > 0 degrees of freedom, zero location parameter and unit scatter parameter has density:

f(x) = \frac{2\Gamma\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\,\Gamma\left(\frac{\nu}{2}\right)} \left(1 + \frac{x^2}{\nu}\right)^{-\frac{\nu+1}{2}}, \quad x \geq 0.

Value

A list including:

iters

The number of iterations required by the Newton-Raphson algorithm.

nu

The estimated degrees of freedom of the half t distribution.

loglik

The value of the maximised log-likelihood.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Psarakis and Panaretos (1990). The folded t distribution. Communications in Statistics–Theory and Methods, 19(7): 2717–2734.

https://en.wikipedia.org/wiki/Folded-t_and_half-t_distributions

See Also

halft.mle, dfoldedt

Examples

x <- abs( rt(1000, 5) )
halft.mle(x)