<s>
Stan	B-Application
is	O
a	O
probabilistic	O
programming	O
language	O
for	O
statistical	O
inference	O
written	O
in	O
C++	B-Language
.	O
</s>
<s>
The	O
Stan	B-Application
language	O
is	O
used	O
to	O
specify	O
a	O
(	O
Bayesian	O
)	O
statistical	O
model	O
with	O
an	O
imperative	B-Application
program	I-Application
calculating	O
the	O
log	O
probability	O
density	O
function	O
.	O
</s>
<s>
Stan	B-Application
is	O
licensed	O
under	O
the	O
New	O
BSD	O
License	O
.	O
</s>
<s>
Stan	B-Application
is	O
named	O
in	O
honour	O
of	O
Stanislaw	O
Ulam	O
,	O
pioneer	O
of	O
the	O
Monte	B-Algorithm
Carlo	I-Algorithm
method	I-Algorithm
.	O
</s>
<s>
Stan	B-Application
was	O
created	O
by	O
a	O
development	O
team	O
consisting	O
of	O
34	O
members	O
that	O
includes	O
Andrew	O
Gelman	O
,	O
Bob	O
Carpenter	O
,	O
Matt	O
Hoffman	O
,	O
and	O
Daniel	O
Lee	O
.	O
</s>
<s>
The	O
Stan	B-Application
language	O
itself	O
can	O
be	O
accessed	O
through	O
several	O
interfaces	O
:	O
</s>
<s>
CmdStan	O
–	O
a	O
command-line	O
executable	O
for	O
the	O
shell	B-Application
,	O
</s>
<s>
CmdStanR	O
and	O
rstan	O
–	O
R	B-Language
software	I-Language
libraries	O
,	O
</s>
<s>
CmdStanPy	O
and	O
PyStan	O
–	O
libraries	O
for	O
the	O
Python	B-Language
programming	I-Language
language	I-Language
,	O
</s>
<s>
MatlabStan	O
–	O
integration	O
with	O
the	O
MATLAB	B-Language
numerical	O
computing	O
environment	O
,	O
</s>
<s>
Stan.jl	O
–	O
integration	O
with	O
the	O
Julia	B-Application
programming	I-Application
language	I-Application
,	O
</s>
<s>
StataStan	O
–	O
integration	O
with	O
Stata	B-Algorithm
.	O
</s>
<s>
In	O
addition	O
,	O
higher-level	O
interfaces	O
are	O
provided	O
with	O
packages	O
using	O
Stan	B-Application
as	O
backend	O
,	O
primarily	O
in	O
the	O
R	B-Language
language	I-Language
:	O
</s>
<s>
rstanarm	O
provides	O
a	O
drop-in	O
replacement	O
for	O
frequentist	O
models	O
provided	O
by	O
base	O
R	B-Language
and	O
lme4	O
using	O
the	O
R	B-Language
formula	O
syntax	O
;	O
</s>
<s>
brms	O
provides	O
a	O
wide	O
array	O
of	O
linear	O
and	O
nonlinear	O
models	O
using	O
the	O
R	B-Language
formula	O
syntax	O
;	O
</s>
<s>
Stan	B-Application
implements	O
gradient-based	O
Markov	B-General_Concept
chain	I-General_Concept
Monte	I-General_Concept
Carlo	I-General_Concept
(	O
MCMC	O
)	O
algorithms	O
for	O
Bayesian	O
inference	O
,	O
stochastic	O
,	O
gradient-based	O
variational	O
Bayesian	O
methods	O
for	O
approximate	O
Bayesian	O
inference	O
,	O
and	O
gradient-based	O
optimization	O
for	O
penalized	O
maximum	O
likelihood	O
estimation	O
.	O
</s>
<s>
Stan	B-Application
implements	O
reverse-mode	O
automatic	B-Algorithm
differentiation	I-Algorithm
to	O
calculate	O
gradients	O
of	O
the	O
model	O
,	O
which	O
is	O
required	O
by	O
HMC	O
,	O
NUTS	O
,	O
L-BFGS	B-Algorithm
,	O
BFGS	B-Algorithm
,	O
and	O
variational	O
inference	O
.	O
</s>
<s>
The	O
automatic	B-Algorithm
differentiation	I-Algorithm
within	O
Stan	B-Application
can	O
be	O
used	O
outside	O
of	O
the	O
probabilistic	O
programming	O
language	O
.	O
</s>
<s>
Stan	B-Application
is	O
used	O
in	O
fields	O
including	O
social	O
science	O
,	O
pharmaceutical	O
statistics	O
,	O
market	O
research	O
,	O
and	O
medical	B-Application
imaging	I-Application
.	O
</s>
