| paras {MM} | R Documentation |
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 signature 'paras'
length(x)
Arguments
x |
Object of class |
p |
In function |
theta |
In function |
pnames |
In function |
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
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)