Learn R Programming

mixAR (version 0.22.8)

err: Calculate component specific error terms under MixAR model

Description

Returns a matrix which columns correspond to the error terms. Each column's row will assume value 0 if the observation was not "assigned" to that component.

Usage

err(AR, mu, y, z, pk)

Value

e

a matrix which columns correspond to component specific "residuals", which are equal to 0 for observations not assigned to such component.

Arguments

AR

a list with autoregressive components.

mu

Component means.

y

a time series (currently a numeric vector).

z

a matrix which columns contain observations "assignment". Hence each row will contain one 1 and (g-1) 0's

pk

autoregressive orders.

Author

Davide Ravagli