| t2 | R Documentation |
Density, distribution function, quantile function, and random generation for the t distribution with location and scale parameters.
dt2(x, mu, sigma, df, log = FALSE)
pt2(q, mu, sigma, df, lower.tail = TRUE, log.p = FALSE)
rt2(n, mu, sigma, df)
qt2(p, mu, sigma, df, lower.tail = TRUE, log.p = FALSE)
pt.ad(q, df)
x, q |
vector of quantiles |
mu |
location parameter |
sigma |
scale parameter, must be positive. |
df |
degrees of freedom, must be positive. |
log, log.p |
logical; if |
lower.tail |
logical; if |
n |
number of random values to return. |
p |
vector of probabilities |
This implementation of dt2 allows for automatic differentiation with RTMB.
f(x;\,\mu,\sigma,\nu) = \frac{1}{\sigma}\,f_t\!\left(\frac{x-\mu}{\sigma};\,\nu\right),
where f_t(\cdot;\nu) is the Student-t PDF with \nu degrees of freedom.
dt2 gives the density, pt2 gives the distribution function, qt2 gives the quantile function, and rt2 generates random deviates.
pt.ad is an AD-compatible replacement for stats::pt. It is used
internally and is reached automatically whenever an argument is an AD variable,
so stats::pt is left untouched for ordinary use.
x <- rt2(1, 1, 2, 5)
d <- dt2(x, 1, 2, 5)
p <- pt2(x, 1, 2, 5)
q <- qt2(p, 1, 2, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.