offset
Set an Offset Value in a Modelling Formula

Description

Allows you to specify an offset value to subtract from the response in a formula.

Usage

offset(object)

Arguments

object An expression.

Details

This function is used only on the right side of a formula, to specify an expression to be subtracted from the response (on the left side of the formula). For glm models this subtraction is done after the inverse-link function is applied to the response.
Value
The same as the input.
See Also
formula, glm, lm, terms.
Examples
# fit response to Start and Age
fit1 <- glm(Kyphosis ~ Start + Age,
            data=Sdatasets::kyphosis, family=binomial)
# fit response to Start, assume coefficient of Age is 0.01
fit0 <- glm(Kyphosis ~ Start + offset(0.01 * Age),
            data=Sdatasets::kyphosis, family=binomial)
# compare the fits: is estimates Age coefficient different than 0.01?
anova(fit0, fit1)
Package stats version 6.0.0-69
Package Index