Skip to contents

This class represents a collection of Prior objects. It provides methods for accessing, adding and removing priors from the list

Value

A PriorList object.

Public fields

priors

A list of Prior object.

Methods


Method new()

Initializes the object

Usage

PriorList$new(priors)

Arguments

priors

A list of Prior object.

Returns

NULL


Method print()

Print out summary statistics

Usage

PriorList$print()

Returns

A message on screen


Method show()

Aliases that calls print.

Usage

PriorList$show()

Returns

A message on screen


Method length()

Number of priors in object

Usage

PriorList$length()

Returns

A numeric with the number of priors set


Method ids()

Ids of prior objects

Usage

PriorList$ids()

Returns

A list with ids of the priors objects for query


Method varnames()

Variable names of priors in object

Usage

PriorList$varnames()

Returns

A character list with the variable names of the priors.


Method classes()

Function to return the classes of all contained priors

Usage

PriorList$classes()

Returns

A character list with the class names of the priors.


Method types()

Get types of all contained priors

Usage

PriorList$types()

Returns

A character list with the type names of the priors.


Method exists()

Does a certain variable or type combination exist as prior ?

Usage

PriorList$exists(variable, type = NULL)

Arguments

variable

A character with the variable name.

type

A character with the type.

Returns

A character id.


Method add()

Add a new prior to the object.

Usage

PriorList$add(p)

Arguments

p

A Prior object.

Returns

Invisible TRUE


Method get()

Get specific prior values from the list if set

Usage

PriorList$get(variable, type = NULL, what = "value")

Arguments

variable

A character with the variable name.

type

A character with the type name

what

A character on the specific entry to return (Default: prior value).

Returns

The prior object.


Method collect()

Collect priors for a given id or multiple.

Usage

PriorList$collect(id)

Arguments

id

A character with the prior id.

Returns

A PriorList object.


Method rm()

Remove a set prior by id

Usage

PriorList$rm(id)

Arguments

id

A character with the prior id.

Returns

Invisible TRUE


Method summary()

Summary function that lists all priors

Usage

PriorList$summary()

Returns

A data.frame with the summarized priors.


Method combine()

Combining function to combine this PriorList with another new one

Usage

PriorList$combine(x)

Arguments

x

A new PriorList object.

Returns

Invisible TRUE


Method clone()

The objects of this class are cloneable with this method.

Usage

PriorList$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
priors(
    INLAPrior('var1','normal',c(0,0.1)),
    INLAPrior('var2','normal',c(0,0.1))
   )
} # }