Skip to contents

Define the likelihood by assigning a distribution to a data gretaR_array. This registers the distribution as a likelihood term in the model's log-joint density.

Usage

distribution(x) <- value

Arguments

x

A data gretaR_array (created with as_data).

value

A distribution gretaR_array (e.g., from normal).

Value

The data gretaR_array x, invisibly.

Examples

if (FALSE) { # \dontrun{
y <- as_data(rnorm(100))
mu <- normal(0, 10)
sigma <- half_cauchy(1)
distribution(y) <- normal(mu, sigma)
} # }