楼主: peyzf
10650 16

[一般统计问题] areg对大量虚拟变量的“批量控制” [推广有奖]

  • 1关注
  • 63粉丝

警督

大师

59%

还不是VIP/贵宾

-

威望
2
论坛币
566901 个
通用积分
188.2317
学术水平
218 点
热心指数
240 点
信用等级
140 点
经验
132143 点
帖子
12795
精华
0
在线时间
2969 小时
注册时间
2007-9-8
最后登录
2024-4-24

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

练习如下:

reg y x i.country*i.industry, vce(rob)

可能是涉及到过多的国家、产业虚拟变量(40*60),模型一直得不到估算结果,还经常停机。据说absorb_reg对于这种存在大量虚拟变量的模型具有很强的估算能力,其估算写法为

egen cou_ind=group(country industry)

areg y x i.country i.industry,a(cou_ind) vce(rob)

两者是否等价?从估算速度来看,后者要快许多,是否不如前者控制得更为严格。

我会仔细学习areg的基本原理,在此仅提出问题,供大家思考,讨论。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:虚拟变量 批量控制 ARE REG Industry industry country 国家 模型

沙发
peyzf 发表于 2012-12-4 16:48:07 |只看作者 |坛友微信交流群
Acemoglu and Johnson (2007)在文章中大量使用了该方法。

使用道具

藤椅
h3327156 发表于 2012-12-4 17:22:33 |只看作者 |坛友微信交流群
您还是仔细对照一下手册好了【至少在相关的东西】
按手册举的例子,是不等价的。

您演练的例子,i.country*i.industry 真的看不懂,
一般应该是i.country#i.industry才对。

另外您例子中的reg与areg,对照手册的例子,实在不知道您想要做什么比较演练。

建议
要嘛您
reg y x i.country#i.industry, vce(rob)
areg y x ,a(cou_ind) vce(rob)

要不就
reg y x i.country i.industry i.country#i.industry, vce(rob)
areg y x i.country i.industry,a(cou_ind) vce(rob)

当然这只是我对照手册的初级感想…
也许有错…参考就好…


已有 1 人评分学术水平 热心指数 收起 理由
peyzf + 1 + 1 good suggestion

总评分: 学术水平 + 1  热心指数 + 1   查看全部评分

使用道具

板凳
peyzf 发表于 2012-12-5 02:03:58 |只看作者 |坛友微信交流群
thanks

使用道具

报纸
peyzf 发表于 2012-12-5 02:11:53 |只看作者 |坛友微信交流群
对不起,前面漏写了  xi:
  应该是:


xi:reg y x i.country*i.industry, vce(rob)

可能是涉及到过多的国家、产业虚拟变量(40*60),模型一直得不到估算结果,还经常停机。据说absorb_reg对于这种存在大量虚拟变量的模型具有很强的估算能力,其估算写法为

egen cou_ind=group(country industry)

xi:areg y x i.country i.industry,a(cou_ind) vce(rob)

使用道具

地板
peyzf 发表于 2012-12-5 02:15:45 |只看作者 |坛友微信交流群
我看到有些书本介绍可以用

i.country*i.industry  来构造两个分类变量的交乘项。 但最新的stata 手册中 说要用i.country#i.industry

两者是等价的吗?

使用道具

7
peyzf 发表于 2012-12-5 02:20:40 |只看作者 |坛友微信交流群
弱问一下,stata manual 是系统自带的
STATAQUICK REFERENCEANDINDEX RELEASE 11 吗(菜单栏help中的pdf文档)?

如果不是,可以在哪里找到?

使用道具

8
peyzf 发表于 2012-12-5 02:24:39 |只看作者 |坛友微信交流群
help xi you will get it

使用道具

9
peyzf 发表于 2012-12-5 04:04:03 |只看作者 |坛友微信交流群
areg fits a linear regression absorbing one categorical factor. areg is designed for datasets with
many groups, but not a number of groups that increases with the sample size. See the xtreg, fe
command in [XT] xtreg for an estimator that handles the case in which the number of groups increases
with the sample size.

此话如何理解?

使用道具

10
peyzf 发表于 2012-12-5 04:59:04 |只看作者 |坛友微信交流群
手册中有介绍:
areg is designed for datasets with many groups, but not a number that grows with the sample
size. Consider two different samples from the U.S. population. In the first sample, we have 10,000
individuals and we want to include an indicator for each of the 50 states, whereas in the second
sample we have 3 observations on each of 10,000 individuals and we want to include an indicator for
each individual. areg was designed for datasets similar to the first sample in which we have a fixed
number of groups, the 50 states. In the second sample, the number of groups, which is the number of
individuals, grows as we include more individuals in the sample. For an estimator designed to handle
the case in which the number of groups grows with the sample size, see the xtreg, fe command
in

多有打搅,抱歉。。。

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-6-15 21:00