Skip to contents

Helper constructor for defining an interaction (including cross-level interactions such as x1:z1) inside effects$interactions of new_spec_ir().

Usage

spec_interaction(term1, term2, beta = 0.2)

Arguments

term1

Character scalar naming the first predictor.

term2

Character scalar naming the second predictor.

beta

Numeric scalar true interaction coefficient.

Value

A named list with elements terms (length-2 character vector) and beta.

Examples

spec_interaction("x1", "z1", beta = 0.25)
#> $terms
#> [1] "x1" "z1"
#> 
#> $beta
#> [1] 0.25
#>