get.longrun.growth {tdata} | R Documentation |
Calculate Long-run Growth
Description
Use this function to calculate the long-run growth of a time-series data.
Usage
get.longrun.growth(
data,
continuous = FALSE,
isPercentage = FALSE,
trimStart = 0,
trimEnd = 0,
skipZero = TRUE
)
Arguments
data |
A numeric vector that represents the data of the series. |
continuous |
A logical value indicating whether to use the continuous formula. |
isPercentage |
A logical value indicating whether the unit of measurement in |
trimStart |
If the number of leading |
trimEnd |
Similar to |
skipZero |
If |
Details
A variable can have discrete growth (y(t)=y(0) (1+g_1)(1+g_2)\ldots (1+g_t)
)
or continuous growth (y(t)=y(0)e^{g_1}e^{g_2}\ldots e^{g_t}
) over t
periods.
y(0)
is the first value and y(n)
is the last value.
By long-run growth rate, we mean a number such as g
such that if
we start from y(0)
and the variable growth is g
every period,
we reach y(t)
after t periods. This number summarizes all g_i
s,
however, it is not generally the average of these rates.
Value
The long-run growth rate (percentage).
Examples
y <- c(60, 70, 80, 95)
g <- get.longrun.growth(y, isPercentage = TRUE, continuous = FALSE)
# Note that 'g' is different from 'mean(y)'.