---
title: "Example models"
output:
  html_document:
    css: greta.css
    toc: yes
    toc_float:
      collapsed: false
    toc_depth: 3
    theme: lumen
    highlight: default
vignette: >
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteIndexEntry{Example models}
  %\usepackage[utf8]{inputenc}
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(comment = NA,
                      eval = greta:::check_tf_version("message"),
                      cache = TRUE)
library (greta)
```

## BUGS models

The BUGS project provide a number of example models written in the BUGS modelling language. These models will run in WinBUGS and OpenBUGS, and likely also in JAGS. The [Stan wiki](https://github.com/stan-dev/example-models/wiki/BUGS-Examples-Sorted-Alphabetically) provides Stan implementations of these models.

The following sections provide greta implementations of some of these example models, alongside the BUGS code from [WinBUGS examples volume 2](https://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol2.pdf) (pdf) and Stan code and an R version of the data from the [Stan example models wiki](https://github.com/stan-dev/example-models/wiki). 

<hr>

```{r child='examples/air.Rmd'}
```

<hr>

```{r child='examples/beetles.Rmd'}
```

<hr>
