mitchelloharawild / distributional

Vectorised distributions for R
https://pkg.mitchelloharawild.com/distributional
GNU General Public License v3.0
94 stars 15 forks source link

Scaled-and-shifted Student's t distribution? #28

Closed mjskay closed 4 years ago

mjskay commented 4 years ago

From an uncertainty vis perspective, having a scaled-and-shifted Student's t dist would be very useful: it's pretty common for both frequentist confidence distributions and Bayesian priors.

As a bonus, if it followed the Stan parameter order (df, location, scale) it would even more useful :).

My humble suggestion would be to modify dist_student_t to use something like (df, mu, sigma, ncp) (assuming not too many people have starting using it yet / or tend to use ncp as a named parameter anyway).

mjskay commented 4 years ago

I'm happy to write a PR for this if you want it. I would propose changing the signature of dist_student_t from dist_student_t(df, ncp = NULL) to dist_student_t(df, mu = 0, sigma = 1, ncp = NULL) and updating the other functions for the student t distribution accordingly.

mitchelloharawild commented 4 years ago

A PR would be great for this. Thanks!