sigma_conv: Sigma-convergence statistic

View source: R/sigma_conv.R

sigma_convR Documentation

Sigma-convergence statistic

Description

Given a dataframe of quantitative indicators along time, the sigma convergence is a statistic capturing some convergence features. A time variable must be present whether sorted or not. Missing values are not allowed. Here it is calculated at each observed time. All countries belonging to the reference mean must be included into the dataset.

Usage

sigma_conv(tavDes, timeName = "time", time_0 = NA, time_t = NA)

Arguments

tavDes

the dataframe time by countries.

timeName

the name of the variable that contains time information.

time_0

starting time to consider; if NA all times considered.

time_t

last time to consider; if NA all times considered.

Value

a tibble with the value of sigma convergence (called stdDev or CV) along time, where the original *timeName* is preserved.

References

https://unimi2013-my.sharepoint.com/:u:/g/personal/federico_stefanini_unimi_it/EW0cVSIgbtZAvLPNbqcxdX8Bfn5VGSRHfAH88hQwc_RIEQ?e=MgtSZu

Examples


# 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
    )
reSigConv <- sigma_conv(myTB,timeName="years")

# Results for the sigma convergence:
reSigConv$res

# Example 2
# Sigma convergence, scrambled time, different name, subset of times:
myTB1  <- tibble::tribble(
    ~years, ~UK, ~DE, ~IT,
    1990,   998,  1250, 332,
    1988,   1201, 868, 578,
    1989,   1150, 978, 682,
    1991,   232, 225, 227,
    1987,   122, 212, 154
    )
reSigConv1 <- sigma_conv(myTB1,timeName="years", time_0 = 1988,time_t = 1990)

# Example 3
# Sigma convergence for the emp_20_64_MS Eurofound dataset:
data("emp_20_64_MS")
reSigConv2 <- sigma_conv(emp_20_64_MS)
reSigConv3 <- sigma_conv(emp_20_64_MS, timeName = "time", time_0 = 2002,time_t = 2004)
reSigConv4 <- sigma_conv(emp_20_64_MS, timeName = "time", time_0 = 2002,time_t = 2016)


convergEU documentation built on March 7, 2023, 7:22 p.m.