# using the standard deviation
upDo_CoDi(emp_20_64_MS,
timeName = "time",
indiType = "highBest",
time_0 = 2010,
time_t = 2015,
heter_fun = "var" # watchout the denominator here is n-1
)
# using the standard pop_var function
upDo_CoDi(emp_20_64_MS,
timeName = "time",
indiType = "highBest",
time_0 = 2010,
time_t = 2015,
heter_fun = "pop_var" # the denominator here is n
)
# using personalized summary of dispersion
diffQQmu <- function(vettore){
(quantile(vettore,0.75)-quantile(vettore,0.25))/mean(vettore)
}
upDo_CoDi(emp_20_64_MS,
timeName = "time",
indiType = "highBest",
time_0 = 2010,
time_t = 2015,
heter_fun = "diffQQmu"
)
Run the code above in your browser using DataLab