Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.14.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm.Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propagation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible.Stan can be called from the command line using the cmdstan package, through R using the rstan package, and through Python using the pystan package. All three interfaces support sampling and optimization-based inference with diagnostics and posterior analysis. rstan and pystan also provide access to log probabilities, gradients, Hessians, parameter transforms, and specialized plotting.
Stan是一种用于指定统计模型的概率编程语言。 stan程序迫切地定义了基于指定数据和常数条件的参数。从2.14.0版本开始,Stan通过马尔可夫链蒙特卡洛方法(例如No-U-Turn Sampler)提供了连续变量模型的完整贝叶斯推断,这是汉密尔顿蒙特卡洛采样的适应性形式。使用优化方法(例如有限的内存Broyden-fletcher-goldfarb-Shanno algorithm.stan)计算惩罚的最大似然估计,也是计算日志密度及其梯度和Hessians的平台,这些平台可用于替代算法,例如各种算法,例如各种算法,期望传播和边际推断使用近似整合。为此,建立了Stan,以便可以轻松访问算法,诸如接受概率之类的算法的密度,渐变和黑森(Hessians)以及中间量的算法。 RSTAN软件包,并使用Pystan软件包通过Python。所有三个接口都支持基于诊断和后验分析的基于采样和优化推断。 RSTAN和PYSTAN还提供对日志概率,渐变,Hessians,参数转换和专业绘图的访问权限。