MM (version 1.6-5)

paras: Manipulate a paras object

Description

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 paras
length(x)

Arguments

x

Object of class paras

p

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

theta

In function paras(), a \(k\) by \(k\) 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.

See Also

MM, MB

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab