Calculates the density of a truncated Student's t distribution.
Usage
dtt(x, mu = 0, sd = 1, df = 3, range = c(0, Inf), log = FALSE)Arguments
- x
A
numeric vectorat which to evaluate the density.- mu
A
numericscalar representing the mean of the underlying t distribution. Defaults to 0.- sd
A
numericscalar representing the standard deviation of the underlying t distribution. Defaults to 1.- df
A
numericscalar representing the degrees of freedom of the underlying t distribution. Defaults to 3.- range
A
numericvector of length 2 specifying the lower and upper truncation bounds. Defaults toc(0, Inf), indicating truncation from below at 0.- log
Logical; ifTRUE, the natural logarithm of the density is returned. Defaults toFALSE.
Value
A numeric vector of the same length as x, containing the
(log) density values of the truncated t distribution.