Package 'mAr'

Title: Multivariate AutoRegressive Analysis
Description: R functions for the estimation and eigen-decomposition of multivariate autoregressive models.
Authors: Susana Barbosa
Maintainer: S. M. Barbosa <[email protected]>
License: GPL (>= 2)
Version: 1.2-0
Built: 2024-12-11 06:54:32 UTC
Source: CRAN

Help Index


Eigendecomposition of m-variate AR(p) model

Description

Eigen-decomposition of the estimated matrix of autoregressive coefficients from an m-variate AR(p) model

Usage

mAr.eig(A, C = NULL, ...)

Arguments

A

matrix of estimated autoregression coefficients

C

noise covariance matrix

...

additional arguments for specific methods

Value

A list with components:

modes

periods and damping times associated to each eigenmode

eigv

m*p m-dimensional eigenvectors

Author(s)

S. M. Barbosa

References

Barbosa S.M., Silva M.E., Fernandes M.J. (2006), Multivariate autoregressive modelling of sea level time series from TOPEX/Poseidon satellite altimetry. Nonlinear Processes in Geophysics, 13, 177-184.

Neumaier, A. and Schneider, T. (2001), Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27, 1, 27-57.

Schneider, T. and Neumaier, A. (2001), A Matlab package fo the estimation of parameters and eigenmodes of multivariate autoregressive models, 27, 1, 58-65.

Examples

data(pinkham)
y=mAr.est(pinkham,2,5)
mAr.eig(y$AHat,y$CHat)

Estimation of multivariate AR(p) model

Description

Stepwise least-squares estimation of a multivariate AR(p) model based on the algorithm of Neumaier and Schneider (2001).

Usage

mAr.est(x, p, ...)

Arguments

x

matrix of multivariate time series

p

model order

...

additional arguments for specific methods

Details

Fits by stepwise least squares an m-variate AR(p) model given by

X[t]=w+A1X[t1]+...+ApX[tp]+e[t]X[t]=w + A1 X[t-1] +...+ Ap X[t-p] +e[t]

where
X[t]=[X1(t)...Xm(t)]' is a vector of length m
w is a m-length vector of intercept terms
A=[A1 ... Ap] is a mp x m matrix of autoregressive coefficients
e(t) is a m-length uncorrelated noise vector with mean 0 and m x m covariance matrix C

Value

A list with components:

SBC

Schwartz Bayesian Criterion

wHat

vector of intercept terms

AHat

matrix of estimated autoregression coefficients for the fitted model

CHat

noise covariance matrix

resid

residuals from the fitted model

Author(s)

S. M. Barbosa

References

Barbosa S.M., Silva M.E., Fernandes M.J. (2006), Multivariate autoregressive modelling of sea level time series from TOPEX/Poseidon satellite altimetry. Nonlinear Processes in Geophysics, 13, 177-184.

Neumaier, A. and Schneider, T. (2001), Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27, 1, 27-57.

Schneider, T. and Neumaier, A. (2001), A Matlab package fo the estimation of parameters and eigenmodes of multivariate autoregressive models, 27, 1, 58-65.

Lutkepohl, H. (1993), Introduction to Multiple Time Series Analysis. Springer-Verlag, Berlin.

Examples

data(pinkham)
y=mAr.est(pinkham,2,5)

Multivariate autoregressive analysis in PCA space

Description

Estimation of m-variate AR(p) model in reduced PCA space (for dimensionality reduction) and eigen-decomposition of augmented coefficient matrix

Usage

mAr.pca(x, p, k = dim(x)[2], ...)

Arguments

x

matrix of multivariate time series

p

model order

k

number of principal components to retain

...

additional arguments for specific methods

Value

A list with components:

p

model order

SBC

Schwartz Bayesian Criterion

fraction.variance

fraction of variance explained by the retained components

resid

residuals from the fitted model

eigv

m*p m-dimensional eigenvectors

modes

periods and damping times associated to each eigenmode

Author(s)

S. M. Barbosa

References

Neumaier, A. and Schneider, T. (2001), Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27, 1, 27-57.

See Also

mAr.est

Examples

data(sparrows)
A=mAr.est(sparrows,1)$AHat
mAr.eig(A)$modes
mAr.pca(sparrows,1,k=4)$modes

Simulation from a multivariate AR(p) model

Description

Simulation from an m-variate AR(p) model

Usage

mAr.sim(w, A, C, N, ...)

Arguments

w

vector of intercept terms

A

matrix of AR coefficients

C

noise covariance matrix

N

length of output time series

...

additional arguments

Details

Simulation from an m-variate AR(p) model given by

X[t]=w+A1X[t1]+...+ApX[tp]+e[t]X[t]=w + A1 X[t-1] +...+ Ap X[t-p] +e[t]

where
X[t]=[X1(t)...Xm(t)]' is a vector of length m
w is a m-length vector of intercept terms
A=[A1 ... Ap] is a m x mp matrix of autoregressive coefficients
e(t) is a m-length uncorrelated noise vector with mean 0 and m x m covariance matrix C

Value

returns a list containg the N simulated observations for each of the m time series

Author(s)

S. M. Barbosa

References

Neumaier, A. and Schneider, T. (2001), Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27, 1, 27-57.

Schneider, T. and Neumaier, A. (2001), A Matlab package fo the estimation of parameters and eigenmodes of multivariate autoregressive models, 27, 1, 58-65.

Lutkepohl, H. (1993), Introduction to Multiple Time Series Analysis. Springer-Verlag, Berlin.

Examples

w=c(0.25,0.1)
C=rbind(c(1,0.5),c(0.5,1.5))
A=rbind(c(0.4,1.2,0.35,-0.3),c(0.3,0.7,-0.4,-0.5))
x=mAr.sim(w,A,C,N=300)

Lydia Pinkham Annual Advertising and Sales data

Description

Annual domestic advertising and sales of Lydia E. Pinkham Medicine Company in thousands of dollars 1907-1960

Usage

data(pinkham)

Format

A data frame with 54 observations on the 2 variables.

Source

Pankratz, A. (1991) Forecasting With Dynamic Regression Models, Wiley.

References

Wei, W. (1994) Time series analysis - univariate and multivariate methods


Body measurements of sparrows

Description

Body measurements of 48 female sparrows.

Usage

data(sparrows)

Format

A data frame with 48 observations on 5 variables

Source

Manly, B. F. J. (1994). Multivariate Statistical Methods, second edition, Chapman and Hall.


Time series of ocean wave height measurements

Description

Ocean wave height measurements from an wire wave gauge and an infrared wave gauge

Usage

data(waves)

Format

A data frame with 4096 observations on the following 2 variables.

wire.gauge

height of ocean waves from wire wave gauge

ir.gauge

height of ocean waves from infrared wave gauge

Details

Time series of ocean wave height measurements (sampling = 1/ 30 seconds)

Source

Applied Physics Laboratory (Andy Jessup)

References

Jessup, A. T., Melville, W. K., Keller, W. C. (1991). Breaking Waves Affecting Microwave Backscatter: Detection and Verification (1991). Journal of Geophysical Research, 96, C11, 20,547–59.

Percival, D. B. (1993). Spectral Analysis of Univariate and Bivariate Time Series, Chapter 11 of "Statistical Methods for Physical Science," Stanford, J. L. and Vardeman, S. B. (Eds), Academic Press