rp.drop1: Display in graphical form the results of dropping all single...

View source: R/rp_drop1.R

rp.drop1R Documentation

Display in graphical form the results of dropping all single terms from a model.

Description

Plot the results, in terms of F-tests, of dropping all individual terms from a linear model. This is essentially a graphical display of the results from the function drop1. The hierarchy of the model formula is respected so that when interaction terms are present main effect terms are not considered.

Usage

rp.drop1(model, subset.terms, p.reference = c(0.05, 0.01), cols)

Arguments

model

a linear model produced by the lm function.

subset.terms

a character vector containing the names of the subset of terms to be examined.

p.reference

a numeric vector specifying the p-values for which the positions on the F-value scale will be marked.

cols

a named vector of colours to be used in the construction of the plot. See help(rp.colours) for details. The relevant name for rp.drop1 is 'reference'.

Details

The rp.colours function is used internally to set these colours, altered where appropriate by the elements of cols. Users need not employ this function, except to view the default colours.

The ggplot2 package is required by this function. If the ggforce is available, this is used to scale the heights of facet rows when there are multiple terms with different degrees of freedom.

Value

A ggplot object containing the plot.

Examples

## Not run: 
model <- lm(Giving ~ Attend + Employ, data = CofE)
rp.drop1(model)

## End(Not run)

rpanel documentation built on March 12, 2026, 9:07 a.m.

Related to rp.drop1 in rpanel...