A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jrnold/lstbayes below:

jrnold/lstbayes: Language drivers for BUGS, JAGS, and Stan for the LaTeX package listings.

Listings language drivers for BUGS, JAGS, and Stan

Adds support for the following languages to the LaTeX listings package, which pretty-prints source code:

To use, load the package

Then use BUGS, JAGS or Stan as a language in one of the listings environments or commands. For example, to format the Stan Eight schools model,

\begin{lstlisting}[language=Stan]
data {
  int<lower=0> J; // number of schools 
  real y[J]; // estimated treatment effects
  real<lower=0> sigma[J]; // s.e. of effect estimates 
}
parameters {
  real mu; 
  real<lower=0> tau;
  real eta[J];
}
transformed parameters {
  real theta[J];
  for (j in 1:J)
    theta[j] <- mu + tau * eta[j];
}
model {
  eta ~ normal(0, 1);
  y ~ normal(theta, sigma);
}
\end{lstlisting}

Also see the examples in examples.tex and examples.pdf files included in this repository. See the listings documentation for more on how to use the listings package.

Development occurs on github at https://github.com/jrnold/lstbayes.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4