prior: Constructor for 'prior' class

Description Usage Arguments Value References See Also Examples

Description

Calling prior() constructs an object of class prior. The constructor can be called without providing any arguments, but the prior has to be filled with appropriate parameters when MCMC sampling should be performed.

There exists next to the general constructor also an advanced constructor that specifies a data dependent prior. See priordefine() for this advanced constructor.

Usage

1
2
3
4
5
6
prior(
  weight = matrix(),
  par = list(),
  type = c("independent", "condconjugate"),
  hier = TRUE
)

Arguments

weight

A matrix storing the prior parameters for the weight of a finite mixture model.

par

A list storing the prior parameters for the parameters of a finite mixture model.

type

A character specifying what type of prior should be used in Bayesian estimation. Either "independent" for an independent prior distribution or "condconjugate" for a conditionally conjugate prior distribution.

hier

A logical defining, if the used prior should be hierarchical. Hierarchical prior are often more robust, but need an additional layer in sampling, so computing costs increase.

Value

A prior object with the specified slots.

References

See Also

Examples

1
2
# Call the default constructor without any arguments.
f_prior <- prior()

simonsays1980/finmix documentation built on Dec. 23, 2021, 2:25 a.m.