plot_residual_vs_fitted: Plot residual vs. fitted plots for your data

View source: R/plot_residual_vs_fitted.R

plot_residual_vs_fittedR Documentation

Plot residual vs. fitted plots for your data

Description

Plot residual vs. fitted plots for your data

Usage

plot_residual_vs_fitted(
  data,
  raw = TRUE,
  MOR = TRUE,
  groups = "Comparison",
  units = "mmol/L",
  studentize = TRUE,
  include_curve = TRUE,
  save = FALSE,
  save_path = getwd(),
  save_name = "Auto",
  save_device = "pdf",
  size = 8
)

Arguments

data

A data table or data frame grouped by Comparison where for each comparison, residuals and fitted values are included. If you use a raw data set of type LFDT you must specify MOR, raw and groups correctly. See residual_vs_fitted() for more information

raw

Is data raw, or is it on the appropriate form described in the data argument

MOR

Is your data table containing mean of replicates? Only need to specify if raw = TRUE

groups

What are the grouping column names? Only need to specify if raw = TRUE

units

The units of the analyte considered. These are included in the x-axis and y-axis names of the plots

studentize

Should we studentize the residuals. Default is TRUE

include_curve

Should a smoothing curve be included? Default is TRUE

save

Save plot to disk. Default is FALSE. If TRUE, you may specify saving location, file and other with the next four parameters

save_path

Saving location given by a string. Default is the working directory

save_name

Name of the plot used to save. If save_name = 'Auto', a generic name is used based on data

save_device

What file do you want to save the plot as. Valid inputs are 'pdf', 'png', 'jpeg', and more. Using 'png' will produce plots with retina dpi

size

What should the size of the saved plot be? The number specified is the height of the plot. The width of the plot is calculated based on this and the golden ratio

Value

A plot (ggplot2 object) based on data.

Examples

print(1)

pernille267/commutability.selectivity documentation built on July 20, 2022, 9:11 a.m.