Equivalent to fitted(fit, ...) - fit$data[, fit$data$yvar] (or fitted(fit, ...) - newdata[, fit$data$yvar]),
but with fixed arguments for fitted: rate = FALSE, which_y = 'ct', samples_format = 'tidy'.
# S3 method for mcpfit residuals( object, newdata = NULL, summary = TRUE, probs = TRUE, prior = FALSE, varying = TRUE, arma = TRUE, nsamples = NULL, ... )
| object | An |
|---|---|
| newdata | A |
| summary | Summarise at each x-value |
| probs | Vector of quantiles. Only in effect when |
| prior | TRUE/FALSE. Plot using prior samples? Useful for |
| varying |
|
| arma | Whether to include autoregressive effects.
|
| nsamples | Integer or |
| ... | Currently unused |
# \donttest{ residuals(ex_fit) residuals(ex_fit, probs = c(0.1, 0.5, 0.9)) # With median and 80% credible interval. residuals(ex_fit, summary = FALSE) # Samples instead of summary. # }