View source: R/mcpfit_methods.R
residuals.mcpfit | R Documentation |
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 class '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 |
One of:
|
arma |
Whether to include autoregressive effects.
|
nsamples |
Integer or |
... |
Currently unused |
Jonas Kristoffer Lindeløv jonas@lindeloev.dk
pp_eval
fitted.mcpfit
predict.mcpfit
residuals(demo_fit)
residuals(demo_fit, probs = c(0.1, 0.5, 0.9)) # With median and 80% credible interval.
residuals(demo_fit, summary = FALSE) # Samples instead of summary.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.