setPriors | R Documentation |
Set priors for MHalgoGen()
setPriors(
par = stop("A vector with init values is necessary."),
se = NULL,
density = "dunif",
rules = NULL,
silent = FALSE
)
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. |
setPriors is a general function to set priors for MHalgoGen()
Return a data.frame with priors
Marc Girondot marc.girondot@gmail.com
Other mcmcComposite functions:
MHalgoGen()
,
as.mcmc.mcmcComposite()
,
as.parameters()
,
as.quantiles()
,
merge.mcmcComposite()
,
plot.PriorsmcmcComposite()
,
plot.mcmcComposite()
,
summary.mcmcComposite()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.