hyper2: Basic functions in the hyper2 package

Description Usage Arguments Details Author(s) See Also Examples

Description

Basic functions in the hyper2 package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hyper2(L, d, pnames = NA)
## S3 method for class 'hyper2'
brackets(H)
## S3 method for class 'hyper2'
powers(H)
## S3 method for class 'hyper2'
pnames(H)
size(H)
as.hyper2(L,d,pnames)
is_valid_hyper2(L,d,pnames)
is_constant(H)

Arguments

H

A hyper2 object

L

A list whose elements specify the brackets of a hyper2 object

d

A vector of powers; hyper2() recycles only if d is of length 1

pnames

A character vector specifying the names of p_1 through p_n.

Details

These are the basic functions of the hyper2 package. Function hyper() is the low-level creator function; as.hyper2() is a bit more user-friendly and attempts to coerce its arguments into a suitable form; for example, a matrix is interpreted as rows of brackets.

Function is_valid_hyper2() tests for valid input, returning a Boolean.

Function size() returns the (nominal) length n of nonnegative vector p=(p_1,...,p_n) where p_1+...+p_n=1. Note that function lhyper2() takes the vector p=(p_1,...,p_{n-1}).

Author(s)

Robin K. S. Hankin

See Also

Ops.hyper2,Extract,loglik

Examples

1
hyper2(list(1,2,3,1:2,2:3),1:5)

Example output

p1 * (p1 + p2)^4 * p2^2 * (p2 + p3)^5 * p3^3

hyper2 documentation built on Aug. 10, 2018, 1:15 a.m.