Description Usage Arguments Details Value Author(s) See Also Examples

`prior`

is a function that generates a `prior.class`

containing information about one or
several priors. When several priors are selected, the function `prior`

returns a list of `prior.class`

.

1 | ```
prior(type.prior, opt.prior)
``` |

`type.prior` |
the vector of the prior types selected. For example type.prior=c("gaussian","gamma") |

`opt.prior` |
list of the hyperparameters relatives to the prior selected. If the first prior selected is Gaussian, the hyperparameters would be the mean and the standard deviation. See Details for further clarifications. |

The densities implemented are defined as follow

The Gaussian density:

*f(x)=1/(σ*√(2π))exp{-1/2*((x-μ)/σ)^2}*where

and*μ*(the mean and the standard deviation) are the two hyperparameters. The vector*σ**c(μ,σ^2)*is the one looked for in opt.prior.The Gamma density:

*f(x)=1/(k^a*Γ(a))*x^(a-1)*exp(-(x/k))*where

and*a*(the shape and the scale) are the two hyperparameters. The vector*k**c(a,k)*is the one looked for in opt.prior.The Uniform density:

*f(x)=1/(b-a)*where

and*a*(the upper and the lower bound) are the two hyperparameters. The vector*b**c(a,b)*is the one looked for in opt.prior.

`prior`

returns a `prior.class`

object. Two main methods are available:

plot() display the probability density of the prior

print() returns the main information concerning the prior distribution

M. Carmassi

`model`

, `calibrate`

, `forecast`

, `sequentialDesign`

1 2 3 4 5 6 7 8 9 10 11 12 | ```
## Not run:
#### Only one prior is wanted
## For a Gaussian Prior
gaussian <- prior(type.prior="gaussian",opt.prior=list(c(0.5,0.001)))
plot(gaussian)
#### For several priors
priors <- prior(type.prior=c("gaussian","gamma"),opt.prior=list(c(0.5,0.001),c(5,1)))
plot(priors$Prior1)
plot(priors$Prior2)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.