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 data is a percentage (e.g., growth rate).
If TRUE, the long-run growth rate is calculated by the arithmetic mean for the continuous case and the geometric mean otherwise.
If missing data exists, it returns NA.
trimStart
If the number of leading NAs is larger than this number, the function returns NA.
Otherwise, it finds the first non-NA value and continues the calculations.
trimEnd
Similar to trimStart, but for the end of the series.
skipZero
If TRUE, leading and trailing zeros are skipped, similar to NA.
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.