prior: Generates 'prior.class' objects.

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

View source: R/functions.R

Description

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.

Usage

1
prior(type.prior, opt.prior)

Arguments

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.

Details

The densities implemented are defined as follow

Value

prior returns a prior.class object. Two main methods are available:

Author(s)

M. Carmassi

See Also

model, calibrate, forecast, sequentialDesign

Examples

 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)

mathieucarmassi/CaliCo documentation built on Aug. 14, 2019, 11:32 a.m.