Delta convergence

Delta convergence is a reduction of a country distance from the best performing Member State. There is convergence if there is a decrease in the period considered.



Let $y_{m,i,t}$ be the value of indicator $i$ for member state $m$ at time $t$, and $y^{(M)}{i,t}$ the maximum value over member states in the reference set $A$: $$ y^{(M)}{i,t} = max({ y_{m,i,t}: m \in A}) $$

The distance of a member state $m$ from the top performer at time $i$ is: $$ y^{(M)}{i,t} - y{m,i,t} $$ thus the overall distance at time $t$, called delta, is the sum of distances over the reference set $A$ of MS: $$ \delta_{i,t} = \sum_{m \in A} (y^{(M)}{i,t} - y{m,i,t}) $$ for the considered indicator $i$.

For each year, the above summaries are calculated to assess if a reduction in the amplitude on the took place.

## already set at start
resDelta <-   delta_conv(wkDF2,
                         timeName = timeName,
                         indiType = params$indiType,# "highBest","lowBest", #params$indiType
                         time_0 = NA,
                         time_t = NA,
                         extended = TRUE) 


lastRowAveragesDel <- nrow(resDelta$res$delta_conv)

plot2de <- qplot( resDelta$res$delta_conv$time, resDelta$res$delta_conv$delta,
      xlab= paste("Years "),
      ylab= paste("Delta  (",aggregation,")")) +
  geom_line()  +
  ggplot2::scale_x_continuous(
       breaks = seq(ptime_0,ptime_t),
       labels = seq(ptime_0,ptime_t)) +
  ggplot2::theme( 
         axis.text.x=ggplot2::element_text(
         angle = 45,
         vjust = 1,
         hjust = 1))

delta_gr1 <-  grid.arrange(
                    plot2de, ncol=1)
# export
out_packed_list$delta_gr1 <-  delta_gr1

invisible(delta_gr1) 


Delta summary list:

out_packed_list$deltaSummary <-  list(
  indicatorType= params$indiType,
  startingYear = ptime_0,
  endingYear = ptime_t,
  startingAverage = as.numeric(outMed[1,aggregation]),
  endingAverage = as.numeric(outMed[lastRowAverages,aggregation]),
  DeltaAverage =  as.numeric(outMed[lastRowAverages,aggregation])-
                   as.numeric(outMed[1,aggregation]),
  #
  delta_conv_output= resDelta$res

  )


federico-m-stefanini/convergEU documentation built on July 30, 2023, 3:22 a.m.