Skip to contents

This class sets up the base class for priors which will be inherited by all priors.

Value

Defines a Prior object.

Note

This functionality likely is deprecated or checks have been superseeded.

Public fields

id

A character with the id of the prior.

name

A character with the name of the prior.

type

A character with the type of the prior.

variable

A character with the variable name for the prior.

distribution

A character with the distribution of the prior if relevant.

value

A numeric or character with the prior value, e.g. the hyper-parameters.

prob

Another numeric entry on the prior field. The inclusion probability.

lims

A limitation on the lower and upper bounds of a numeric value.

Methods


Method new()

Initializes the object and prepared the various prior variables

Usage

Prior$new(
  id,
  name,
  variable,
  value,
  type = NULL,
  distribution = NULL,
  prob = NULL,
  lims = NULL
)

Arguments

id

A character with the id of the prior.

name

A character with the name of the prior.

variable

A character with the variable name for the prior.

value

A numeric or character with the prior value, e.g. the hyper-parameters.

type

A character with the type of the prior.

distribution

A character with the distribution of the prior if relevant.

prob

Another numeric entry on the prior field. The inclusion probability.

lims

A limitation on the lower and upper bounds of a numeric value.

Returns

NULL


Method print()

Print out the prior type and variable.

Usage

Prior$print()

Returns

A message on screen


Method validate()

Generic validation function for a provided value.

Usage

Prior$validate(x)

Arguments

x

A new prior value.

Returns

Invisible TRUE


Method get()

Get prior values

Usage

Prior$get(what = "value")

Arguments

what

A character with the entry to be returned (Default: value).

Returns

Invisible TRUE


Method set()

Set prior

Usage

Prior$set(x)

Arguments

x

A new prior value as numeric or character.

Returns

Invisible TRUE


Method get_id()

Get a specific ID from a prior.

Usage

Prior$get_id()

Returns

A character id.


Method get_name()

Get Name of object

Usage

Prior$get_name()

Returns

Returns a character with the class name.


Method clone()

The objects of this class are cloneable with this method.

Usage

Prior$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.