使用调查数据计算 1% 的富人集中精力的程度 [英] Compute how much the one percent wealthier concentrates using survey data

查看:37
本文介绍了使用调查数据计算 1% 的富人集中精力的程度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 R 中计算 1% 的富人集中了多少.例如,也许 1% 的富人集中了该国 33% 的总财富.

I would like to compute in R how much the one percent wealthier concentrates. For example, maybe it is the case that the one percent wealthier concentrates 33% of total wealth in the country.

我有一个包含变量的调查数据集:

I have a survey dataset with the variables:

  • 资产:每个人(行)的总资产价值;
  • wgt :与每个个体(行)相关的样本权重.

计算此浓度度量的最佳方法是什么?

What is the best way to compute this concentration measure?

非常感谢!

推荐答案

欢迎来到 SO.请不要被downvoters气馁,我认为你的问题是完全合理的.假设您的调查设计对象是 scf.design .. 这样,您可以尝试使用 消费者财务调查

welcome to SO. please don't be discouraged by the downvoters, i think your question is perfectly reasonable. let's say your survey design object is scf.design .. that way, you could try a test case using the survey of consumer finances

# compute the cutoff point for the top percentile
y <- coef( svyquantile( ~ asset , scf.design , 0.99 ) )
# for this, you probably don't need the standard error, 
# so immediately just extract the coefficient (the actual number)
# and discard the standard error term by using the `coef` function
# around the `svyquantile` call

# create a new flag in your survey design object
# that's a 1 if the individual is in the top percentile
# and a 0 for everybody else
scf.design <- update( scf.design , onepct = as.numeric( asset > y ) )

# calculate the aggregate of all assets
# held by the top percentile
# and also held by everybody else
svyby( ~asset , ~onepct , scf.design , svytotal )

# or, if you like, calculate them separately
svytotal( ~asset , subset( scf.design , onepct == 1 ) )

svytotal( ~asset , subset( scf.design , onepct == 0 ) )

# and divide each of those numbers by all assets
# held by everybody
svytotal( ~asset , scf.design )

这篇关于使用调查数据计算 1% 的富人集中精力的程度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆