% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setPriors1.R
\name{setPriors1}
\alias{setPriors1}
\title{Set priors for MHalgoGen()}
\usage{
setPriors1(
  Name = stop("A name of parameter is required."),
  Prior1 = NULL,
  Prior2 = NULL,
  Prior3 = NULL,
  Parameters = NULL,
  Density = stop("A density is required."),
  SDProp = stop("A SD of proposal is required."),
  Min = -Inf,
  Max = +Inf,
  Init = stop("An initial value is required.")
)
}
\arguments{
\item{Name}{Name of the parameter.}

\item{Prior1}{The value for the first parameter of the prior distribution.}

\item{Prior2}{The value for the second parameter of the prior distribution.}

\item{Prior3}{The value for the third parameter of the prior distribution.}

\item{Parameters}{A vector with parameters of the prior distribution}

\item{Density}{The density function of the prior (ex. "dunif", "dnorm", "dbeta").}

\item{SDProp}{The SD of the propositions for the Markov chain.}

\item{Min}{The minimum value to truncate the prior distribution.}

\item{Max}{The maximum value to truncate the prior distribution.}

\item{Init}{The value at the first iteration.}
}
\value{
Return a data.frame with the formatted prior
}
\description{
Set priors for MHalgoGen()\cr
A check is done to verify that the Init value is well between the Min and Max range.\cr
The order of Prior1, 2, and 3 must be similar to the order in the Density function.
For this reason, it is safer to use Parameters.\cr
As a rule of thumb, SDProp can be 1/10th of the range of posterior. For example if
the posterior is thought to be from 0.1 to 0.2, you can use SDProp being (0.2-0.1)/10=0.01.
}
\details{
setPriors1 is a general function to set priors for MHalgoGen()
}
\examples{
\dontrun{
library(HelpersMG)
Priors <- setPriors1(Name="a0", Prior1=0, Prior2=1, Density="dunif", 
                     SDProp=0.1, Min=0, Max=1, Init=0.5)
Priors <- Priors + setPriors1(Name="a1", Prior1=0.5, Prior2=0.1, Density="dnorm", 
                     SDProp=0.05, Min=0, Max=1, Init=0.5)
# Using Parameters
Priors <- setPriors1(Name="a0", Parameters=c(min=0, max=1), Density="dunif", 
                     SDProp=0.1, Min=0, Max=1, Init=0.5)
Priors <- Priors + setPriors1(Name="a1", Parameters=c(mean=0.5, sd=0.1), Density="dnorm", 
                     SDProp=0.05, Min=0, Max=1, Init=0.5)
}
}
\seealso{
Other mcmcComposite functions: 
\code{\link{+.PriorsmcmcComposite}()},
\code{\link{MHalgoGen}()},
\code{\link{as.mcmc.mcmcComposite}()},
\code{\link{as.parameters}()},
\code{\link{as.quantiles}()},
\code{\link{merge.mcmcComposite}()},
\code{\link{plot.PriorsmcmcComposite}()},
\code{\link{plot.mcmcComposite}()},
\code{\link{setPriors}()},
\code{\link{summary.mcmcComposite}()}
}
\author{
Marc Girondot \email{marc.girondot@gmail.com}
}
\concept{mcmcComposite functions}
