Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mhp

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

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)

multivator

A Multivariate Emulator

v1.1-10
GPL-2
Authors
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.