Helpful Stan Functions
|
Functions | |
real | gpareto_lpdf (vector y, real ymin, real k, real sigma) |
real | gpareto_cdf (vector y, real ymin, real k, real sigma) |
real | gpareto_lcdf (vector y, real ymin, real k, real sigma) |
real | gpareto_lccdf (vector y, real ymin, real k, real sigma) |
real | gpareto_rng (real ymin, real k, real sigma) |
real gpareto_cdf | ( | vector | y, |
real | ymin, | ||
real | k, | ||
real | sigma | ||
) |
Generalized Pareto cumulative density function
https://mc-stan.org/users/documentation/case-studies/gpareto_functions.html Accessed Feb. 6, 2021
y | Vector on (u,Inf) |
ymin | Real on [0,Inf) the lower bound of data y |
k | Real shape parameter |
sigma | Real on (0,Inf) scale parameter |
real gpareto_lccdf | ( | vector | y, |
real | ymin, | ||
real | k, | ||
real | sigma | ||
) |
Generalized Pareto log complementary cumulative density function
https://mc-stan.org/users/documentation/case-studies/gpareto_functions.html Accessed Feb. 6, 2021
y | Vector on (u,Inf) |
ymin | Real on [0,Inf) the lower bound of data y |
k | Real shape parameter |
sigma | Real on (0,Inf) scale parameter |
real gpareto_lcdf | ( | vector | y, |
real | ymin, | ||
real | k, | ||
real | sigma | ||
) |
Generalized Pareto log cumulative density function
https://mc-stan.org/users/documentation/case-studies/gpareto_functions.html Accessed Feb. 6, 2021
y | Vector on (u,Inf) |
ymin | Real on [0,Inf) the lower bound of data y |
k | Real shape parameter |
sigma | Real on (0,Inf) scale parameter |
real gpareto_lpdf | ( | vector | y, |
real | ymin, | ||
real | k, | ||
real | sigma | ||
) |
Generalized Pareto log density
https://mc-stan.org/users/documentation/case-studies/gpareto_functions.html Accessed Feb. 6, 2021
The Generalized Pareto distribution is defined as \($ p(y|u,\sigma,k)= \begin{cases} \frac{1}{\sigma}\left(1+k\left(\frac{y-u}{\sigma}\right)\right)^{-\frac{1}{k}-1}, & k\neq 0 \\ \frac{1}{\sigma}\exp\left(\frac{y-u}{\sigma}\right), & k = 0, \end{cases} \)$ where \(u\) is a lower bound parameter, \(\sigma\) is a scale parameter, \(k\) is a shape parameter, and \( y \) is the data restricted to the range \((u,\infty)\) (see, e.g., https://en.wikipedia.org/wiki/Generalized_Pareto_distribution for cdf and random number generation)
y | Vector on (u,Inf) |
ymin | Real on [0,Inf) the lower bound of data y |
k | Real shape parameter |
sigma | Real on (0,Inf) scale parameter |
real gpareto_rng | ( | real | ymin, |
real | k, | ||
real | sigma | ||
) |
Generalized Pareto rng function
https://mc-stan.org/users/documentation/case-studies/gpareto_functions.html Accessed Feb. 6, 2021
ymin | Real on [0,Inf) the lower bound of data y |
k | Real shape parameter |
sigma | Real on (0,Inf) scale parameter |