<< freqts_c Time series lagda >>

Grocer >> Time series > growthr

growthr

growth rate of a ts

CALLING SEQUENCE

ts=growthr(ts,lag)

PARAMETERS

Input

* ts = a timeseries

* lag = an integer (optional, set to 1 if not provided)

 

Output

* ts = the growthr of the time series

DESCRIPTION

Computes ts(t)/ts(t-lag)-1. If a value for ts is 0, then the corresponding value is set to 'NA'.

EXAMPLE

load(GROCERDIR+'\data\pigiron.dat')
gx = growthr(prigiron)
// growth rate of the monthly series pigiron used for the Bry-Bosachna demo
ga = growthr(x,12)
// year on year growth rate of the monthly series pigiron.

AUTHOR

Eric Dubois 2002

Report an issue
<< freqts_c Time series lagda >>