Learn R Programming

hypr (version 0.2.8)

+,hypr,hypr-method: Combining hypr objects by addition or interaction

Description

You can combine one or more hypr objects, i.e. combine their hypothesis to a single hypr object, by adding them with the + or \* operators.

Usage

# S4 method for hypr,hypr
+(e1, e2)

# S4 method for hypr,hypr *(e1, e2)

# S4 method for hypr,hypr &(e1, e2)

# S4 method for hypr,hypr /(e1, e2)

Value

The combined hypr object

Arguments

e1, e2

hypr objects to concatenate

Functions

  • e1 * e2: Interaction of e1 and e2

  • e1 & e2: Interaction and main contrasts of e1 and e2

  • e1 / e2: Nesting levels of e2 within e1

Examples

Run this code

(h1 <- hypr(a~i, b~i)) # a hypr object of two treatments

(h2 <- hypr(i~0)) # an intercept-only hypr object

hc <- h1 + h2

hc

interaction <- h1 & h2

interaction_and_main <- h1 * h2

Run the code above in your browser using DataLab