请选择 进入手机版 | 继续访问电脑版
楼主: 黃河泉
86731 191

[程序分享] reghdfe 与常数项。   [推广有奖]

somnus91 发表于 2018-5-20 11:35:17 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-20 10:52
这超乎我的知识了。晚一点你再试试,或问其他人(其他电脑)有无类似问题。
这个跟stata版本有关系么,老师,您用的哪个版本呢

使用道具

黃河泉 在职认证  发表于 2018-5-20 11:57:01 |显示全部楼层 |坛友微信交流群
somnus91 发表于 2018-5-20 11:35
这个跟stata版本有关系么,老师,您用的哪个版本呢
Stata 15.1 (MP4)。

使用道具

somnus91 发表于 2018-5-20 12:03:42 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-20 11:57
Stata 15.1 (MP4)。
好的,谢谢!我用15试试

使用道具

somnus91 发表于 2018-5-20 23:27:33 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-20 11:57
Stata 15.1 (MP4)。
老师,我用stata15也不能下载最新版,貌似是连不上链接的原因,但是我的网页是可以打开的,您知道怎么手动安装这个最新版吗?

使用道具

黃河泉 在职认证  发表于 2018-5-21 10:32:45 |显示全部楼层 |坛友微信交流群
somnus91 发表于 2018-5-20 23:27
老师,我用stata15也不能下载最新版,貌似是连不上链接的原因,但是我的网页是可以打开的,您知道怎么手动 ...
看看其他同学有无类似情况。

使用道具

somnus91 发表于 2018-5-21 23:23:11 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-20 10:53
所以现在是怎样?
A fixed effect is “nested within cluster” if the same variable is used in vce(cluster ...) and in absorb(...) or—more generally—if a cluster variable is coarser than a fixed effect variable. For instance, if we have state–clustered standard errors and county–level fixed effects, or with clustering by year and monthly fixed effects.

Whenever this happens, reghdfe will avoid applying a double penalty to the standard errors: it will continue to cluster by e.g. state but will not use the number of counties when computing the absorbed degrees of freedom.

老师,关于我之前cluster了一个固定效应变量之后该固定效应就被去掉的原因如上,请问这个问题怎么解决呢?求老师解答,谢谢老师了!

使用道具

黃河泉 在职认证  发表于 2018-5-22 06:36:12 |显示全部楼层 |坛友微信交流群
somnus91 发表于 2018-5-21 23:23
A fixed effect is “nested within cluster” if the same variable is used in vce(cluster ...) and i ...
看不懂你的问题。

使用道具

somnus91 发表于 2018-5-22 08:07:58 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-22 06:36
看不懂你的问题。
是这样的,我在使用行业、年份、地区作为固定效应的时候同时cluster了行业,做出来的结果显示如下:
Absorbed degrees of freedom:                                                                       
---------------------------------------------------------------+                                                                       
Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |                                                                        
-------------+-------------------------------------------------|                                                                       
        year |           11              11              0     |                                                                        
      hydd_f |            0              28             28 *   |                                                                        
    dqcity_f |          287             288              1     |                                                                        
---------------------------------------------------------------+                                                                       
* = fixed effect nested within cluster; treated as redundant for DoF computation                                                                       

我查了一下解释,解释如下:
A fixed effect is “nested within cluster” if the same variable is used in vce(cluster ...) and in absorb(...) or—more generally—if a cluster variable is coarser than a fixed effect variable. For instance, if we have state–clustered standard errors and county–level fixed effects, or with clustering by year and monthly fixed effects.

Whenever this happens, reghdfe will avoid applying a double penalty to the standard errors: it will continue to cluster by e.g. state but will not use the number of counties when computing the absorbed degrees of freedom.

但我还是不太明白,这个意思是cluster和固定效应中不能用同一个变量吗?

使用道具

黃河泉 在职认证  发表于 2018-5-22 10:20:51 |显示全部楼层 |坛友微信交流群
somnus91 发表于 2018-5-22 08:07
是这样的,我在使用行业、年份、地区作为固定效应的时候同时cluster了行业,做出来的结果显示如下:
Abs ...
应该不是,而且我不觉得这些问题有什么重要性?

使用道具

hustlc319 发表于 2018-5-23 01:44:00 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2018-5-21 10:32
看看其他同学有无类似情况。
  1. . net install reghdfe, from("https://github.com/sergiocorreia/reghdfe/raw/master/src/")  replace
  2. java.security.cert.CertificateException: No subject alternative DNS name matching github.com found.
  3. https://github.com/sergiocorreia/reghdfe/raw/master/src/ either
  4.   1)  is not a valid URL, or
  5.   2)  could not be contacted, or
  6.   3)  is not a Stata download site (has no stata.toc file).

  7. current site is still http://fmwww.bc.edu/repec/bocode/r/
  8. r(5100);
复制代码
一样依然是这种问题,不知道是何原因

使用道具

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

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

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

GMT+8, 2024-4-19 07:26