setPriors {HelpersMG}R Documentation

Set priors for MHalgoGen()

Description

Set priors for MHalgoGen()

Usage

setPriors(
  par = stop("A vector with init values is necessary."),
  se = NULL,
  density = "dunif",
  rules = NULL,
  silent = FALSE
)

Arguments

par

Named vector with init value of parameters

se

Named vector with standard error of parameters

density

Named vector with density or single value

rules

List of rules to define priors

silent

If TRUE, do not show warning.

Details

setPriors is a general function to set priors for MHalgoGen()

Value

Return a data.frame with priors

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Other mcmcComposite functions: MHalgoGen(), as.mcmc.mcmcComposite(), as.parameters(), as.quantiles(), merge.mcmcComposite(), plot.PriorsmcmcComposite(), plot.mcmcComposite(), summary.mcmcComposite()

Examples

## Not run: 
library(HelpersMG)
rules <- rbind(data.frame(Name="^a", Min=0, Max="x*2"), 
              data.frame(Name="^b", Min=0, Max=100))
par <- c(a0=10, a1=2, b2=20)
(p <- setPriors(par=par, se=NULL, density="dgamma", rules=rules))
(p <- setPriors(par=par, se=NULL, density="dnorm", rules=rules))
(p <- setPriors(par=par, se=NULL, density="dunif", rules=rules))
par <- c(a0=10, a1=2, b2=20, b1=-1)
(p <- setPriors(par=par, se=NULL, density="dgamma", rules=rules))

## End(Not run)

[Package HelpersMG version 6.1 Index]