Allows arithmetic operators “+”, “*” and comparison operators “==” and “!=”, to be used for hyper3 objects.

Specifically, H1 + H2 implements addition of two log-likelihood functions, corresponding to incorporation of additional independent observational data; and n*H1 implements H1+H1+...+H1, corresponding to repeated independent observations of the same data.

# S3 method for class 'hyper3'
Ops(e1, e2 = NULL)
hyper3_add(e1,e2)
hyper3_prod(e1,n)

Arguments

e1,e2

Objects of class hyper3

n

Numeric vector of length 1

Details

Pretty much everything documented here is a straightforward translation of the corresponding hyper2 functionality.

Value

Returns a hyper3 object or a Boolean.

Author

Robin K. S. Hankin

Examples


H1 <- hyper3(list(c(a=1.2),c(b=1),c(a=1.2,b=1)),powers=c(3,4,-7))
H2 <- hyper3(list(c(a=1.2),c(b=1.2),c(a=2.2,b=1.2)),powers=c(2,3,-5))

H1
#> log( (a=1.2)^3 * (a=1.2, b=1)^-7 * (b=1)^4)
H2
#> log( (a=1.2)^2 * (a=2.2, b=1.2)^-5 * (b=1.2)^3)