These are density, distribution function, quantile function and random generation
for the Student-t distribution with location mu
, scale sigma
,
and degrees of freedom df
. Base R gives you the so-called "standard" Student-t
distribution, with just the varying degrees of freedom. This generalizes that standard
Student-t to the three-parameter version.
dst(x, df, mu, sigma)pst(q, df, mu, sigma)
qst(p, df, mu, sigma)
rst(n, df, mu, sigma)
dst()
returns the density. pst()
returns the distribution function. qst()
returns the quantile function.
rst()
returns random numbers.
a vector of quantiles
a vector of degrees of freedom
a vector for the location value
a vector of scale values
Vector of probabilities.
Number of samples to draw from the distribution.
This is a simple hack taken from Wikipedia. It's an itch I've been wanting to scratch for a while. I can probably generalize this outward to allow the tail and log stuff, but I wrote this mostly for the random number generation. Right now, I haven't written this to account for the fact that sigma should be non-negative, but that's on the user to know that (for now).