diff_terms: Compare the formulas of two models and return the...

View source: R/util.R

diff_termsR Documentation

Compare the formulas of two models and return the difference(s).

Description

Compare the formulas of two models and return the difference(s).

Usage

diff_terms(model1, model2)

Arguments

model1

A fitted regression model (using lm, glm, gam, or bam).

model2

A fitted regression model (using lm, glm, gam, or bam).

Value

A list with model terms that are not shared by both models.

Author(s)

Jacolien van Rij

See Also

Other Utility functions: convertNonAlphanumeric(), corfit(), find_difference(), missing_est(), modeledf(), observations(), print_summary(), refLevels(), res_df(), summary_data(), timeBins()

Examples

data(simdat)

# Fit simple GAM model:
gam1 <- bam(Y ~ s(Time), data=simdat)
gam2 <- bam(Y ~ Group+s(Time), data=simdat)
diff_terms(gam1, gam2)


itsadug documentation built on June 17, 2022, 5:05 p.m.