Learn R Programming

REAT (version 3.0.2)

growth: 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 \(t\))

val2

Second numeric vector (e.g. employment at time \(t\)) or data frame for times t+1, t+2, t+3, ..., t+n

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: output = "rate") or annual values (output = "annual")

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 (factor.mean = "mean") or geometric mean (factor.mean = "geom")

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

Examples

Run this code
# NOT RUN {
# 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
# }

Run the code above in your browser using DataLab