Compute the mean of the residuals
Arguments
- fitobj
Output of the
fitfunction.
Value
Numeric denoting the mean of the residuals. If multiple dimensions exist in the residuals, then the mean will be computed for each dimension separately and the average of them will be returned.
Examples
# Generate a dataset
data <- dataset(Y = rnorm(100), X = rnorm(100)) |>
suppressWarnings()
# Estimate the exponential discounting model on these data
fitobj <- fit(
exponential(),
data,
itermax = 50,
trace = FALSE
)
# Compute the autocorrelation based on this fitobj
bias(fitobj)
#> [1] 4.810028e-05