drop_term: Drop a term from the given model

View source: R/generate_models.R

drop_termR Documentation

Drop a term from the given model

Description

This function is needed to re-fit the models for Type III SS. If you have a model with an interactive term (e.g. y ~ a + b + a:b), when you try to refit without one of the lower-order terms (e.g. y ~ a + a:b) lm() will add it back in. This function uses a fitting function that operates underneath lm() to circumvent this behavior. (It is very similar to drop1().)

Usage

drop_term(fit, term)

Arguments

fit

The model to update.

term

The term to drop from the model.

Value

An object of the class lm.


supernova documentation built on May 29, 2024, 4:47 a.m.