is_offset: Is a model term an offset?

Description Usage Arguments Value Author(s) Examples

Description

Given a character vector of model terms, checks to see which, if any, is the model offset.

Usage

1

Arguments

terms

character vector of model terms.

Value

A logical vector of the same length as terms.

Author(s)

Gavin L. Simpson

Examples

1
2
3
4
5
6
library("mgcv")
df <- gamSim(1, n = 400, dist = "normal")
m <- gam(y ~ s(x0) + s(x1) + offset(x0), data = df, method = "REML")
nm <- names(model.frame(m))
nm
is_offset(nm)

gavinsimpson/schoenberg documentation built on May 28, 2019, 8:43 a.m.