Learn R Programming

bayesmix (version 0.7-6)

BMMpriors: Create a 'BMMpriors' object

Description

This function enables a comfortable creation of BMMpriors objects, which can be used for specifying the priors of a BMMmodel.

Usage

BMMpriors(specification, y, eps = 10^-16)

Value

There is an object BMMpriors returned with components

name

vector indicating which kind of prior is specified and if it is an hierarchical prior and if appropriate with respect to which variable.

var

list of variables in the prior and their specified values.

Arguments

specification

named list including kind, parameter, hierarchical and mod.

y

a numeric vector.

eps

a numeric value indicating the smallest value for flat priors.

Author

Bettina Gruen

Details

In specification kind can be used for specifying if an "independent" or a "conditionallyconjugate" prior shall be used. parameter can be a named list of values for the prior variables or a function name (e.g., "priorsUncertain", "priorsFish", "priorsRaftery"). hierarchical can be NULL or "tau" if a hierarchical prior shall be taken for \(\tau\). mod is a named list which provides the possibility to override the values from parameter.

Examples

Run this code
  data("fish", package = "bayesmix")
  priors <- BMMpriors(y = fish)

Run the code above in your browser using DataLab