growth {REAT} | R Documentation |
Growth rates
Description
This function calculates the growth from two input numeric vectors
Usage
growth(val1, val2, growth.type = "growth",
output = "rate", rate.perc = FALSE, log.rate = FALSE,
factor.mean = "mean", time.periods = NULL)
Arguments
val1 |
First numeric vector (e.g. employment at time |
val2 |
Second numeric vector (e.g. employment at time |
growth.type |
Type of growth value that has to be calculated (absolute values or growth rate) |
output |
Type of output in the case of several years: growth rate (default: |
rate.perc |
Logical argument that indicates whether growth rates are expressed in percent or not |
log.rate |
Logical argument that indicates whether growth rates are logged or not |
factor.mean |
If growth factors are returned: arithmetic mean ( |
time.periods |
No. of regarded time periods (for average growth rates) |
Value
A numeric vector containing the growth rates in the same order as stated
Author(s)
Thomas Wieland
Examples
# Example from Farhauer/Kroell (2013):
region_A_t <- c(90,20,10,60)
region_A_t1 <- c(100,40,10,55)
# data for region A (time t and t+1)
nation_X_t <- c(400,150,150,400)
nation_X_t1 <- c(440,210,135,480)
# data for the national economy (time t and t+1)
growth(region_A_t, region_A_t1)
data(Freiburg)
# Loads the data
growth(Freiburg$e_Freiburg2008, Freiburg$e_Freiburg2014, growth.type = "rate")
# Industry-specific growth rates for Freiburg 2008 to 2014