mhp {multivator}R Documentation

Multivatriate hyperparameter (mhp) objects

Description

Create and manipulate multivatriate hyperparameter (mhp) objects

Usage

mhp(M, B, levels = NULL, names = NULL)
is.mhp(x)
M(x)
M(x) <- value
B(x)
B(x) <- value
levels(x)
summary(object,...)

Arguments

M

Variance matrix (must be positive definite)

B

Array of roughness parameters. Each slice (ie B[,,i]) must be positive-definite

levels

Character vector holding the levels. Default NULL means to use rownames(M) or dimnames(B[[3]])

names

Character vector holding the names of the dimensions. Default of NULL means to use dimnames(B[[1]])

x, object

Object of class mhp

value

Replacement object

...

Further arguments passed to the summary method

Details

An mhp object must have names and levels, so either provide them explicitly with the eponymous arguments, or give named arrays to M and B.

Value

Returns an object of class mhp

Author(s)

Robin K. S. Hankin

See Also

mdm

Examples


hp <- mhp(M=diag(2),B=array(c(diag(3),diag(3)),c(3,3,2)),
names=letters[1:3],levels=c("oak","ash"))
M(hp)
B(hp)[1,1,1] <- 30  # try a negative value and see what happens
names(hp)
names(hp) <-  c("Alice","Zachy","Annabel")
levels(hp) <- c("squid","snail")
summary(hp)


[Package multivator version 1.1-11 Index]