bru_is_additive: Check for predictor expression additivity

View source: R/bru_is.R

bru_is_additiveR Documentation

Check for predictor expression additivity

Description

Checks if a predictor expression is additive or not

Usage

bru_is_additive(x, ...)

## Default S3 method:
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'numeric'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'name'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'call'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'expression'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'quosure'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'formula'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'character'
bru_is_additive(x, ..., verbose = FALSE)

## S3 method for class 'bru_pred_expr'
bru_is_additive(x, ...)

## S3 method for class 'bru_obs'
bru_is_additive(x, ...)

## S3 method for class 'bru_obs_list'
bru_is_additive(x, ...)

Arguments

x

A predictor expression, formula, or parse information data.frame.

...

Arguments passed on recursively.

verbose

logical; if TRUE, print diagnostic parsing information.

Value

TRUE if the expression is detected to be additive, FALSE otherwise.

Examples

bru_is_additive(~ x + y)
bru_is_additive(~ x * y)


inlabru documentation built on July 28, 2026, 9:07 a.m.