This is an old version, view current version.

15.5 Student-T Distribution

15.5.1 Probability Density Function

If νR+, μR, and σR+, then for yR, StudentT(y|ν,μ,σ)=Γ((ν+1)/2)Γ(ν/2) 1νπ σ (1+1ν(yμσ)2)(ν+1)/2.

15.5.2 Sampling Statement

y ~ student_t(nu, mu, sigma)

Increment target log probability density with student_t_lpdf( y | nu, mu, sigma) dropping constant additive terms.

15.5.3 Stan Functions

real student_t_lpdf(reals y | reals nu, reals mu, reals sigma)
The log of the Student-t density of y given degrees of freedom nu, location mu, and scale sigma

real student_t_cdf(reals y, reals nu, reals mu, reals sigma)
The Student-t cumulative distribution function of y given degrees of freedom nu, location mu, and scale sigma

real student_t_lcdf(reals y | reals nu, reals mu, reals sigma)
The log of the Student-t cumulative distribution function of y given degrees of freedom nu, location mu, and scale sigma

real student_t_lccdf(reals y | reals nu, reals mu, reals sigma)
The log of the Student-t complementary cumulative distribution function of y given degrees of freedom nu, location mu, and scale sigma

R student_t_rng(reals nu, reals mu, reals sigma)
Generate a Student-t variate with degrees of freedom nu, location mu, and scale sigma; may only be used in generated quantities block. For a description of argument and return types, see section vectorized PRNG functions.