plot_residuals_func: plot_residuals_func

View source: R/plot_residuals_func.R

plot_residuals_funcR Documentation

plot_residuals_func

Description

This functions take a nested df containing a model information including the column augment and return the residuals for a given model. Use this function chained with the extract_model_info().

Usage

plot_residuals_func(
  model_nsdf,
  augmented_df = "augment",
  faceted_by_1 = "Condition  + Animal",
  faceted_by_2 = "."
)

Arguments

model_nsdf

A nested df containing a model object and previously processed with the extract_model_info() function.

augmented_df

The column name containing the df with the fit vs residuals values of the model. By default this columns in named "augment".

faceted_by_1

A string. Grouping variables for visualization. Default to Condition + Animal.

faceted_by_2

A string. Additional grouping variables for visualization. Default to ..

Value

A new column called res_vs_fit_plot containing ggplot objects with the residual plots of the model.

Note

Make sure that the column of with your variable names are named Parameters or variables otherwise the plot names will crash. Similarly, name your column with the name of the model as model_name or could output unexpected results.

Examples

# No run


rjlopez2/AnlysisOfWaves documentation built on Sept. 15, 2022, 2:25 p.m.