RATS 10.1
RATS 10.1

Data Types /

SERIES Aggregator

Home Page

← Previous Next →

The SERIES type by itself is actually short for SERIES[REAL] which is by far the most important use of this. However, you can define SERIES of other types: for instance, the BOOT instruction creates a SERIES of INTEGERS to represent randomly drawn entry numbers. SERIES of various type of matrices are useful in organizing information in (for instance) switching models.

 

A SERIES is similar to a VECTOR of the same type except that it is designed to represent a time series of information. As such, rather than having a specific number of elements starting at entry 1, it can start and end at periods appropriate to the analysis. This can make working with time series much simpler than if you had to constantly shift information around to match different samples.  You can also use lag notation even for SERIES of data types more complicated that reals.
 

The basic SERIES[REAL] (or SERIES by itself) are used in probably 2/3 of all RATS instructions. SERIES of other types are typically created by the GSET instruction, which can work any type of elements. (The only other series type which has a specialized instruction is SERIES[COMPLEX] or CSERIES for short, which has the CSET instruction). GSET can only apply if the target SERIES has been declared earlier. For instance,
 

dec series[symm] uu

gset uu gstart gend = %outerxx(rv)

 

generates a SERIES of SYMMETRIC arrays over the range GSTART to GEND from the function %OUTERXX applied to an (already created) SERIES of VECTORs of residuals in a multivariate GARCH model. (The GARCH instruction defines several SERIES of various arrays when doing a multivariate model).


 

dec series[vect] bgibbs

gset bgibbs 1 ndraws = %parmspeek(allparms)

 

creates a SERIES of VECTOR's, one for each draw in a Gibbs sampling procedure, each element of which will have a copy of a set of non-linear parameters.

 


Copyright © 2025 Thomas A. Doan