Skip to contents

Requires BridgeStan package to be installed. Generative model is assumed to be of the form y ~ normal(mu, sigma) for unknown mu ~ normal(0, 3) and sigma ~ half_normal(0, 3).

Usage

example_gaussian_stan_model(n_data = 50, seed = 1234L)

Arguments

n_data

Number of independent data points y to generate and condition model against from normal(0, 1).

seed

Integer seed for Stan model.

Value

BridgeStan StanModel object.

Examples

model <- example_gaussian_stan_model(n_data = 5)
#> [1] "BridgeStan not found at location specified by $BRIDGESTAN environment variable, downloading version 2.6.1 to /home/runner/.bridgestan/bridgestan-2.6.1"
#> [1] "Done!"
model$param_names()
#> [1] "mu"    "sigma"