get.offset: Internal scampr function that creates a fixed effect offset...

View source: R/get.offset.R

get.offsetR Documentation

Internal scampr function that creates a fixed effect offset vector from a formula and data

Description

Internal scampr function that creates a fixed effect offset vector from a formula and data

Usage

get.offset(formula, data, subset, na.action)

Arguments

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of a model. See GLM function for further formula details.

data

a data frame containing predictors and response of the formula parameter.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

na.action

a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.

Value

a data.frame

Examples

des.mat <- scampr:::get.offset(Petal.Length ~ Petal.Width + Species + offset(Petal.Length), iris)
head(des.mat)

ElliotDovers/scampr documentation built on March 17, 2024, 3:27 p.m.