Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tt

The Truncated Student-t Distribution


Description

Density, distribution function, quantile function, and random generation for the left and/or right truncated student-t distribution with df degrees of freedom.

Usage

dtt(x, location = 0, scale = 1, df, left = -Inf, right = Inf, log = FALSE)

ptt(q, location = 0, scale = 1, df, left = -Inf, right = Inf, 
  lower.tail = TRUE, log.p = FALSE)

rtt(n, location = 0, scale = 1, df, left = -Inf, right = Inf)

qtt(p, location = 0, scale = 1, df, left = -Inf, right = Inf,
  lower.tail = TRUE, log.p = FALSE)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

location

location parameter.

scale

scale parameter.

df

degrees of freedom (> 0, maybe non-integer). df = Inf is allowed.

left

left censoring point.

right

right censoring point.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

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

Details

If location or scale are not specified they assume the default values of 0 and 1, respectively. left and right have the defaults -Inf and Inf respectively.

The truncated student-t distribution has density

f(x) = 1/σ τ((x - μ)/σ) / (T((right - μ)/σ) - T((left - μ)/σ))

for left ≤ x ≤ right, and 0 otherwise.

where T and τ are the cumulative distribution function and probability density function of the student-t distribution with df degrees of freedom respectively, μ is the location of the distribution, and σ the scale.

Value

dtt gives the density, ptt gives the distribution function, qtt gives the quantile function, and rtt generates random deviates.

See Also


crch

Censored Regression with Conditional Heteroscedasticity

v1.0-4
GPL-2 | GPL-3
Authors
Jakob Messner [aut, cre] (<https://orcid.org/0000-0002-1027-3673>), Achim Zeileis [aut] (<https://orcid.org/0000-0003-0918-3766>), Reto Stauffer [aut] (<https://orcid.org/0000-0002-3798-5507>)
Initial release
2019-08-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.