Grocer Function

NAME

q2a - transforms quarterly data into annual ones

CALLING SEQUENCE

tsout=q2a(tsin,ind)

PARAMETERS

Input

Output

DESCRIPTION

Transforms quarterly data into annual ones.

EXAMPLE

if x is a annual ts (such as reshape([1:13],'1978q2') then
1) y = q2a(x)
2) y = q2a(x,-1)
3) y = q2a(x,2)

Examples 1 and 2 give exactly the same result: a yearly ts (from 1979a to 1980a with values 22 and 38 with the ts x above).
Example 3 gives a yearly ts whose values come from the second quarter of each year (from 1978a to 1981q4 with values 1, 5, 9, 13 with the ts x above).

AUTHOR

Eric Dubois 2002