Closed ajdamico closed 8 months ago
also talk about this
https://www.ft.com/content/41470ec0-845b-11db-87e0-0000779e2340
@guilhermejacob do you agree with this calculation?
https://www.ft.com/content/41470ec0-845b-11db-87e0-0000779e2340
Personal wealth is distributed so unevenly across the world that the richest two per cent of adults own more than 50 per cent of the world’s assets while the poorest half hold only 1 per cent of wealth.
richest_two_percent_cutoff <- svyquantile( ~ variable , design , 0.02 )
svyratio( ~ ifelse( variable >= coef( richest_two_percent_cutoff ) , variable , 0 ) , ~ variable , design )
poorest_half_cutoff <- svyquantile( ~ variable , design , 0.5 )
svyratio( ~ ifelse( variable < coef( poorest_half_cutoff ) , variable , 0 ) , ~ variable , design )
table showing these results (importantly with confidence intervals!!) using cps hhincome & worker earnings, pnadc per capita income & worker earnings, scf hh income & net worth
library(survey)
library(laeken)
data(eusilc) ; names( eusilc ) <- tolower( names( eusilc ) )
# linearized design
des_eusilc <- svydesign( ids = ~rb030 , strata = ~db040 , weights = ~rb050 , data = eusilc )
des_eusilc <- convey_prep( des_eusilc )
(result <- svylorenz( ~eqincome , des_eusilc, 0.98 , plot= FALSE))
# for each dataset for each variable:
1 - coef( result )
SE( result )
confint(result)
any edits to https://github.com/guilhermejacob/context/pull/37 ? thaaaanks
nah, it looks ok
thank you!