Skip to contents

Returns residuals as an \(N x T\) matrix (rows are units, columns are time). This method is designed for panel diagnostics and downstream tools such as cd_test().

Usage

# S3 method for class 'csdm_fit'
residuals(
  object,
  type = c("e", "u"),
  format = c("matrix", "vector", "long"),
  ...
)

Arguments

object

A fitted object of class csdm_fit.

type

Residual type. Currently only "e" is implemented.

format

Matrix, original-row vector, or long data (with NA padding).

...

Currently unused.

Value

A numeric matrix of residuals with dimensions \(N x T\).