generate_priors: Generate priors.

Description Usage Arguments Examples

View source: R/generate_priors.R

Description

This function generates a list of functions and a list of parameters to be used as priors in run_mcmc(). If nothing is supplied, default priors are returned.

Usage

1
2
3
generate_priors(f_beta = NULL, f_b = NULL, f_s = NULL,
  f_rho_1 = NULL, f_rho_2 = NULL, p_beta = NULL, p_b = NULL,
  p_s = NULL, p_rho_1 = NULL, p_rho_2 = NULL)

Arguments

f_beta

the function to be used as a prior of beta. The default is Cauchy.

f_b

the function to be used as a prior of b. The default is Normal.

f_s

the function to be used as a prior of s. The default is Normal.

f_rho_1

the function to be used as a prior of rho_1. The default is Uniform.

f_rho_2

the function to be used as a prior of rho_2. The default is Uniform.

p_beta

a vector with parameters for the prior of beta. The default is c(0, 4).

p_b

a vector with parameters for the prior of b. The default is c(1, 0.5).

p_s

a vector with parameters for the prior of s. The default is c(1, 0.5).

p_rho_1

a vector with parameters for the prior of rho_1. The default is c(0, 1).

p_rho_2

a vector with parameters for the prior of rho_2. The default is c(0, 1).

Examples

1
2
3
4
5
## use default priors
generate_priors()

## modify prior for beta
generate_priors(f_beta = dnorm, p_beta = c(1, 0.5))

mirjamlaager/mrsamcmc documentation built on May 20, 2020, 11:13 a.m.