Learn R Programming

hyper2 (version 3.0-0)

Ops.hyper3: Arithmetic Ops Group Methods for hyper3 objects

Description

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.

Usage

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

Value

Returns a hyper3 object or a Boolean.

Arguments

e1,e2

Objects of class hyper3

n

Numeric vector of length 1

Author

Robin K. S. Hankin

Details

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

Examples

Run this code

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
H2



Run the code above in your browser using DataLab