G: Growth Rate of a Time Series

Description Usage Arguments Value Examples

Description

G calculates the growth rate of an 'xts' time series.

Usage

1
G(x, lag = 1)

Arguments

x

'xts' time series variable

lag

numeric or character value indicating the number of periods between which the time series grew

Value

'xts' object of growth rates.

Examples

1
2
3
4
5
Y <- pwt(country = 'USA', series = 'gdp')
g_Y <- G(Y)      # 1 period growth rate of GDP
y_Y <- G(Y, 'y') # yearly growth rate of GDP
m_Y <- G(Y, '6m') # 6 month growth rate of GDP
#Table(Y, g_y, y_Y, m_Y)

cmann3/econ311 documentation built on May 31, 2019, 1:14 p.m.