Last chance! 50% off unlimited learning
Sale ends in
Given a dataframe (tibble) of times by countries indicator, the gamma convergence is calculated. A time index is required. Missing values are not allowed.
gamma_conv(rawDat, ref = NA, last = NA, timeName = "time", printRanks = F)
gamma convergence (indicated as KIt in Eurofound 2018 paper).
the tibble made by times and countries.
the reference time, typically zero.
the last time to be considered.
the name of the variable that contains time information.
logical flag for printing ranks based on data.
# Example 1
# Dataframe in the format time by countries:
require(tibble)
myTB <- tibble::tribble(
~years, ~UK, ~DE, ~IT,
1990, 998, 1250, 332,
1988, 1201, 868, 578,
1989, 1150, 978, 682,
1991, 1600, 1350, 802
)
# Gamma convergence, scrambled time and different time name:
resGamma <- gamma_conv(myTB,ref=1988, last=1991, timeName="years")
# Example 2
myTB1 <- tibble::tribble(
~time, ~UK, ~DE, ~IT,
1990, 998, 1250, 332,
1988, 1201, 868, 578,
1989, 1150, 978, 682,
1991, 1600, 1350, 802
)
resGamma1 <- gamma_conv(myTB1, ref=1989,last=1990)
# Example 3
# Gamma convergence for the emp_20_64_MS Eurofound dataset:
data("emp_20_64_MS")
# check name of the time variable
names(emp_20_64_MS)
resGamma2<-gamma_conv(emp_20_64_MS,ref=2002,last=2005)
resGamma3<-gamma_conv(emp_20_64_MS,ref=2002,last=2018)
# Print also ranks based on data:
resGamma4<-gamma_conv(emp_20_64_MS,ref=2002,last=2018,printRanks=TRUE)
Run the code above in your browser using DataLab