| trunct2 | R Documentation |
Density, distribution function, quantile function, and random generation for
the truncated t distribution with location mu and scale sigma.
dtrunct2(x, df, mu = 0, sigma = 1, min = -Inf, max = Inf, log = FALSE)
ptrunct2(q, df, mu = 0, sigma = 1, min = -Inf, max = Inf,
lower.tail = TRUE, log.p = FALSE)
qtrunct2(p, df, mu = 0, sigma = 1, min = -Inf, max = Inf,
lower.tail = TRUE, log.p = FALSE)
rtrunct2(n, df, mu = 0, sigma = 1, min = -Inf, max = Inf)
x, q |
vector of quantiles |
df |
degrees of freedom parameter, must be positive. |
mu |
location parameter. |
sigma |
scale parameter, must be positive. |
min, max |
truncation bounds. |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
number of random values to return. |
This implementation of dtrunct2 allows for automatic differentiation with RTMB.
dtrunct2 gives the density, ptrunct2 gives the distribution function,
qtrunct2 gives the quantile function, and rtrunct2 generates random deviates.
x <- rtrunct2(1, df = 5, mu = 2, sigma = 3, min = -1, max = 5)
d <- dtrunct2(x, df = 5, mu = 2, sigma = 3, min = -1, max = 5)
p <- ptrunct2(x, df = 5, mu = 2, sigma = 3, min = -1, max = 5)
q <- qtrunct2(p, df = 5, mu = 2, sigma = 3, min = -1, max = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.