paras: Manipulate a paras object

parasR Documentation

Manipulate a paras object

Description

\loadmathjax

Various utilities to manipulate paras objects. Functions pnames() and pnames<-() operate on MB objects as expected.

Usage

paras(x, p, theta, pnames = character(0))
p(x) <- value
theta(x) <- value
p(x)
theta(x)
pnames(x)
pnames(x) <- value
getVals(x)
## S4 method for signature 'paras'
length(x)

Arguments

x

Object of class paras

p

In function paras(), a vector of the first \mjseqnk-1 elements of the probabilities

theta

In function paras(), a \mjseqnk by \mjseqnk matrix with diagonal composed of ones

pnames

In function paras(), a character vector of names for the entries

value

Replacement value

Details

A paras object contains the parameters needed to specify a multiplicative multinomial distribution.

Suppose p is an object of class paras object. Then p is a list of two elements. The first element, p, is a vector of length length(p) and the second is an upper-diagonal matrix square matrix of size length(p). The vignette gives further details.

The functions documented here allow the user to inspect and change paras objects.

Author(s)

Robin K. S. Hankin

See Also

MM, MB

Examples

jj <- paras(5)
pnames(jj) <- letters[1:5]
p(jj) <- c(0.1, 0.1, 0.3, 0.1)
theta(jj) <- matrix(1:25,5,5)
pnames(jj) <- letters[1:5]
jj

# OK, we've defined jj, now use it with some other functions:
dMM(rep(1,5),jj)
MM_single(1:5,jj)
rMM(2,9,jj)


MM documentation built on Aug. 23, 2023, 1:08 a.m.