Skip to contents

Load example models from monty. These models exist so that we can create (hopefully) interesting examples in the documentation without them becoming overwhelming. You should probably not use these for anything other than exploring the package.

Usage

monty_example(name, ...)

Arguments

name

Name of the example, as a string. See Details for supported models.

...

Optional parameters that are passed to create the model. All models can be created with no additional parameters, but you can tweak their behaviour by passing named parameters here. See Details.

Value

A monty_model object

Supported models

bananna

The banana model is a two-dimensional banana-shaped function, picked because it is quite annoying to sample from directly. The model has two parameters alpha and beta and is based on two successive draws, one conditional on the other.

You can vary sigma for this model on creation, the default is 0.5

Gaussian

A multivariate Gaussian centred at the origin. Takes a variance-covariance-matrix as its argument. Parameters are letters a, b, ... up to the number of dimensions.

Examples

monty_example("banana")
#> 
#> ── <monty_model> ───────────────────────────────────────────────────────────────
#>  Model has 2 parameters: 'alpha' and 'beta'
#>  This model:
#>  can compute gradients
#>  can be directly sampled from
#>  accepts multiple parameters
#>  See `?monty_model()` for more information
monty_example("gaussian", diag(2))
#> 
#> ── <monty_model> ───────────────────────────────────────────────────────────────
#>  Model has 2 parameters: 'a' and 'b'
#>  This model:
#>  can compute gradients
#>  can be directly sampled from
#>  See `?monty_model()` for more information