partial_residual_plot: Partial Residual Plot

View source: R/partial_residual.R

partial_residual_plotR Documentation

Partial Residual Plot

Description

Partial Residual Plot

Usage

partial_residual_plot(
  plot_formula,
  lm_formula = NULL,
  model = NULL,
  data = NULL,
  added_term = NULL,
  suppress_model = F,
  add_mean = TRUE,
  ...
)

Arguments

plot_formula

a flexplot-style formula for plotting

lm_formula

Optional. A lm-style formula for the model being fit

model

Optional. A lm model

data

The dataset

added_term

a formula, which specifies which terms should be de-residualized. By default, it will use the residuals from 'model'.

suppress_model

A boolean. Should the model be suppressed? Defaults to T.

...

Other arguments passed to flexplot

Value

a partial residual plot

Examples

partial_residual_plot(weight.loss~therapy.type,
   lm_formula = weight.loss~therapy.type + motivation,
   data=exercise_data)

dustinfife/flexplot documentation built on Sept. 23, 2024, 9:01 p.m.