Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

growth.rate

Growth Rates of Time Series


Description

Get or set growth rates of a tis time series in annual percent terms.

Usage

growth.rate(x, lag = 1, simple = T)
growth.rate(x, start = end(x) + 1, simple = T) <- value

Arguments

x

a tis time series or something that can be turned into one by as.tis

lag

number of lags to use in calculating the growth rate as outlined in the details below

simple

simple growth rates if TRUE, compound growth rates if FALSE

start

the first ti time index for which values of x should be replaced to make growth.rate(x[start]) == value[1].

value

desired growth rates

Details

An example: Suppose x is a quarterly series, then if simple is TRUE,

growth.rate(x, lag = 3) == 100 * ((x[t]/x[t-3]) - 1) * (4/3)

while if simple is FALSE

growth.rate(x, lag = 3) == 100 * ((x[t]/x[t-3])^(4/3) - 1).

Value

growth.rate(x) returns a tis series of growth rates in annual percentage terms.

Beginning with the observation indexed by start,

growth.rate(x) <- value

sets the values of x such that the growth rates in annual percentage terms will be equal to value. x is extended if necessary. The modified x is invisibly returned.


tis

Time Indexes and Time Indexed Series

v1.38
Unlimited
Authors
Jeff Hallman <jeffhallman@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.