The goal of standist is to provide functions to easily calculate and visualize the probability density functions of the distributions supported by the Stan platform for probabilistic computing (using the same names and parameterizations as Stan). These functions should be helpful for pedagogical purposes (e.g., learning about the distributions and their parameters) as well as for selecting prior distributions for Bayesian data analyses.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("jmgirard/standist")
library(standist)
d_student_t(x = -10:10, nu = 3, mu = 0, sigma = 2)
#> [1] 0.002109677 0.003059751 0.004581681 0.007112009 0.011486019 0.019330743
#> [7] 0.033754830 0.060008587 0.103374168 0.156590456 0.183776298 0.156590456
#> [13] 0.103374168 0.060008587 0.033754830 0.019330743 0.011486019 0.007112009
#> [19] 0.004581681 0.003059751 0.002109677
visualize("student_t(3, 0, 2)", xlim = c(-10, 10))
visualize("student_t(3, 0, 2)", "student_t(1, 0, 2)", xlim = c(-10, 10))
visualize("normal(0, 2)", "student_t(1, 0, 2)", xlim = c(-10, 10))
Please note that the ‘standist’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.