Description Usage Arguments Value Examples
The functions are designed for compatibility with Stan's student t distribution which has three parameters: degrees of freedom, mean, and standard deviation.
1 |
n |
Number of random draws to perform. |
df |
Degrees of freedom |
mean |
Location parameter (equals mean when |
sigma |
Scale parameter. Note: this is smaller than the standard deviation (when the standard deviation exists). |
sd |
Standard deviation of distribution, but note that this only exists when
|
A vector of random draws from the appropriate t distribution(s).
1 2 3 4 5 | rstudent_t(5, mean = 10, sigma = 2, df = 3)
rstudent_t(5, mean = 10, sd = 2, df = 3)
sd(rstudent_t(5000, mean = 10, sd = 2, df = 4))
# sigma = 2, sd = 2 * sqrt(4/2) approx 2.8
sd(rstudent_t(50000, mean = 10, sigma = 2, df = 4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.