<< lagts Time series m2q >>

Grocer >> Time series > m2a

m2a

transforms monthly data into annual ones

CALLING SEQUENCE

tsout=m2a(tsin,ind)

PARAMETERS

Input

* tsin = a monthly timeseries

* ind =

  . -1 if the annual data is to be the sum of the corresponding months

  . 0 if the annual data is to be the mean of the corresponding months

  .  i if the annual value is to be eqaul to the value of the i-th month

   ind is optional; if not provided, it is set to -1

 

Output

* tsout = the corresponding annual time series

DESCRIPTION

Transforms monthly data into annual ones.

EXAMPLE

ts = reshape([1:35],'1978m4') // ceate a monthly ts
y = m2a(x) // gives an annual ts, from 1979a to 1980a with values 186 and 330
y = m2a(x,-1) // gives an annual ts, from 1979a to 1980a with values 186 and 330
y = m2a(x,3) // gives an annual ts, from 1979a to 1981a with values 11, 23, 35

AUTHOR

Eric Dubois 2002

Report an issue
<< lagts Time series m2q >>