TimeSeries

scalaglm.TimeSeries$
object TimeSeries

Utilities for multivariate time series

These utilities assume that the time series is stored in a Breeze DMD with variables/component series in columns, and observations in rows with the first row corresponding to the first observation and the last row to the last.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TimeSeries.type

Members list

Value members

Concrete methods

def autocovariance(x: DMD, lag: Int, centre: Boolean): DMD

Compute the auto-covariance of the time series at a given lag

Compute the auto-covariance of the time series at a given lag

Value parameters

centre

Does the time series need to be centred?

lag

The lag at which the auto-covariance is to be computed (can be negative)

x

Time series

Attributes

Returns

Auto-covariance matrix

def autocovariances(x: DMD, lagMax: Int, centre: Boolean): List[DMD]

Compute a set of auto-covariance matrices

Compute a set of auto-covariance matrices

Value parameters

centre

Does the time series need to be centred?

lagMax

The maximum lag required

x

Time series

Attributes

Returns

List of lagMax+1 auto-covariance matrices (from lag 0 to lagMax)

def correlationMat(x: DMD, centre: Boolean): DMD

The correlation matrix of a time series

The correlation matrix of a time series

Value parameters

centre

Does the time series need to be centred?

x

A time series

Attributes

Returns

Correlation matrix

def covariance(x: DMD, y: DMD, centre: Boolean): DMD

Compute the covariance between two time series of the same length

Compute the covariance between two time series of the same length

Value parameters

centre

Do the series need to be centred, first?

x

A time series

y

Another time series

Attributes

Returns

Covariance matrix

def fitVar(x: DMD, p: Int, centre: Boolean): (List[DMD], DMD)

Fit a mean-zero VAR(p) model to a time series via least squares. Since the model being fit is mean zero, you may want to mean-centre your data.

Fit a mean-zero VAR(p) model to a time series via least squares. Since the model being fit is mean zero, you may want to mean-centre your data.

Value parameters

centre

Mean-centre the time series before fitting?

p

The order of the VAR(p) model to be fits

x

Time series

Attributes

Returns

The list of p fitted VAR matrices, together with the lower Cholesky triangle of the estimated innovation variance matrix

def isStat(phi: List[DMD]): Boolean

Check whether a given set of VAR matrices (such as returned by fitVar) correspond to a VAR(p) model that is stationary

Check whether a given set of VAR matrices (such as returned by fitVar) correspond to a VAR(p) model that is stationary

Value parameters

phi

List of VAR matrices

Attributes

Returns

Is this model stationary?

def meanCentre(x: DMD): DMD

Sweep out the mean of each component series

Sweep out the mean of each component series

Value parameters

x

A multivariate time series

Attributes

Returns

A mean zero time series

def varianceMat(x: DMD, centre: Boolean): DMD

The variance matrix of a time series

The variance matrix of a time series

Value parameters

centre

Does the time series need to be centred?

x

A time series

Attributes

Returns

Variance matrix