residuals.barma: Calculate Residuals for a barma Model Object

View source: R/residuals.barma.R

residuals.barmaR Documentation

Calculate Residuals for a barma Model Object

Description

Computes various types of residuals for a fitted Beta Autoregressive Moving Average (BARMA) model object of class '"barma"'.

Usage

## S3 method for class 'barma'
residuals(object, type = "standardized", ...)

Arguments

object

A fitted model object of class '"barma"', typically the result of a call to 'barma()'.

type

The type of residuals to compute. Currently, only '"standardized"' (default) is implemented, returning standardized residuals on the predictor scale.

...

Additional arguments (currently ignored).

Details

This function is an S3 method for the generic 'residuals' function, tailored for objects returned by the 'barma()' function.

By default ('type = "standardized"'), it calculates standardized residuals on the predictor scale, defined as:

r_t = \frac{g(y_t) - \hat{\eta}_t}{\sqrt{Var(g(y_t) - \hat{\eta}_t)}}

where Var(g(y_t) - \hat{\eta}_t) \approx (g'(\hat{\mu}_t))^2 \cdot

\frac{\hat{\mu}_t(1-\hat{\mu}_t)}{1+\hat{\phi}}

. These residuals are useful for diagnostic checking, as they are approximately standard normal if the model is correctly specified.

Value

A numeric vector or 'ts' object containing the requested residuals. For standardized residuals, the first 'max_lag' values will be 'NA'.


betaARMA documentation built on March 29, 2026, 5:08 p.m.