You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the incorporation of inv_inc_beta from pr #2637 it is easy to add. Will follow the organization of the files from the std_normal_qf pr #2744
Example
student_t_qf(real u, real nu)
student_t_qf(real u, vector nu)
student_t_qf(real u, array[] real nu)
student_t_qf(vector u, real nu)
student_t_qf(vector u, vector nu)
student_t_qf(vector u, array[] real nu)
student_t_qf(array[] real u, real nu)
student_t_qf(array[] real u, vector nu)
student_t_qf(array[] real u, array[] real nu)
// implementation is simple
student_t_qf(real u, real nu) {
real x = u <0.5?2* u :2* (1- u);
return sign(u -0.5) *sqrt( nu * (1/ (inv_inc_beta(nu /2, 0.5, x))) -1);
}
// where // inv_inc_beta(a, b, p)// * @param a Shape parameter a >= 0; a and b can't both be 0// * @param b Shape parameter b >= 0// * @param p Random variate. 0 <= p <= 1
The text was updated successfully, but these errors were encountered:
However, I need to add the derivatives. Luckily, the 2nd value of the inv_inc_beta is a constant. I can reuse the implementation that is already in stan-math for that part. The method above can be auto-diffed through to test my implementation.
Description
With the incorporation of
inv_inc_beta
from pr #2637 it is easy to add. Will follow the organization of the files from the std_normal_qf pr #2744Example
The text was updated successfully, but these errors were encountered: