tdistribution: A t-distribution
Description
Create an object representing a univariate non-centered t-distribution.
Usage
tdistribution(expectation = 0, degreesoffreedom = 1e+20,
lambda, P = 1)
Arguments
expectation
The expectation of the distribution.
degreesoffreedom
The degrees of freedom parameter.
lambda
The natural logarithm of the scale \(\sigma\) of the distribution.
The standard t-distribution has scale 1, and the default for lambda
is \(\log(1)=0\).
P
An alternative to specifying the logged scale \(\log(\sigma)\) with lambda
is to specify P
: It is defined as \(P=1/\sigma^2\).
Details
The probability density of a t-distribution with expectation \(\mu\),
degrees of freedom \(\nu\), and logged scale \(\lambda\) is proportional to
$$
f(x)=(\nu + e^{-2\lambda}(x-\mu)^2)^{-(\nu+1)/2}
$$
Examples
Run this code# NOT RUN {
dist <- tdistribution(3)
plot(dist)
# }
Run the code above in your browser using DataLab