plot_residuals: plot_residuals

View source: R/plot_residuals.R

plot_residualsR Documentation

plot_residuals

Description

Plots the randomized quantile residuals of the fitted regression model as described in Dunn and Smyth (1996). This plot can be used to assess the fit of the regression.

Usage

plot_residuals(fit, plot = TRUE, text_size = 14)

Arguments

fit

the result of running the 'panstripe' function.

plot

whether to generate the plot (default) or return a data.frame

text_size

the base text size of the plot (default=14)

Value

either a ggplot2 object or a 'data.frame' with the data needed to recreate the plot

Examples


sim <- simulate_pan(rate=1e-4)
fA <- panstripe(sim$pa, sim$tree, nboot=0)
plot_residuals(fA)


gtonkinhill/panstripe documentation built on Feb. 27, 2025, 9:01 p.m.