makemyprior_example_model {makemyprior}R Documentation

Returning a simple example prior object

Description

Creating a simple prior object using make_prior. Used in examples of other functions in the package.

Usage

makemyprior_example_model(seed = 1)

Arguments

seed

A seed value for reproducing the data (default seed = 1).

Details

See the example for what model is made.

Value

An object of class mmp_prior.

Examples


ex_model <- makemyprior_example_model()

## Not run: 
# The function corresponds to the following model call:

set.seed(1)

data <- list(
  a = rep(1:10, each = 10),
  b = rep(1:10, times = 10)
)
data$y <- rnorm(10, 0, 0.4)[data$a] + rnorm(10, 0, 0.6)[data$b] + rnorm(100, 0, 1)

formula <- y ~ mc(a) + mc(b)

prior <- make_prior(formula, data, family = "gaussian",
                    prior = list(tree = "s1 = (a, b); s2 = (s1, eps)",
                                 w = list(s2 = list(prior = "pc0", param = 0.25)),
                                 V = list(s2 = list(prior = "pc", param = c(3, 0.05)))),
                    intercept_prior = c(0, 1000))

## End(Not run)


[Package makemyprior version 1.2.1 Index]