Skip to contents

Plot heatmap of residuals (observed - predicted counts).

Usage

plot_residuals(pred.df = NULL, data = NULL, ...)

Arguments

pred.df

A data frame containing the predicted counts, as generated by predict_counts()

data

Data list (from prepare_data())

...

Further arguments for network.tools::plot_web_heatmap().

Value

A ggplot object

Examples

if (FALSE) { # interactive()
data(web)
dt <- prepare_data(mat = web, sampl.eff = rep(20, nrow(web)))
fit <- fit_model(dt, refresh = 0)
pred.df <- predict_counts(fit, dt)
plot_residuals(pred.df, dt)
plot_residuals(pred.df, dt, sort = FALSE)
}