Package 'foldedt'

Title: The Folded t Family of Distributions
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>.
Authors: Michail Tsagris [aut, cre]
Maintainer: Michail Tsagris <[email protected]>
License: GPL (>= 2)
Version: 1.0
Built: 2026-05-20 09:39:51 UTC
Source: https://github.com/cran/foldedt

Help Index


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 [email protected].

Author(s)

Michail Tsagris [email protected].

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 σ2\sigma^2 parameter.

v

The degrees of freedom, vv.

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 [email protected].

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 [email protected].

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 σ>0\sigma > 0 has density:

f(x)=2Γ(ν+12)νπσΓ(ν2)(1+x2νσ2)ν+12,x0.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 [email protected].

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 ν>0\nu > 0 degrees of freedom, zero location parameter and unit scatter parameter has density:

f(x)=2Γ(ν+12)νπΓ(ν2)(1+x2ν)ν+12,x0.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 [email protected].

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)