楼主: joeatjifang
4824 4

[问答] plm的固定效应模型系数显示不完整 [推广有奖]

  • 0关注
  • 0粉丝

大专生

3%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
2560 点
帖子
14
精华
0
在线时间
61 小时
注册时间
2008-11-17
最后登录
2022-12-20

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我在做面板数据的时候,用了within模型,在结果中系数显示不完整,只有两个滞后项有系数,其他项目都不显示,而在random模型中各项的系数都显示出来了,不知道是什么原因
先用了random模型,结果如下:
  1. > form4<-t_biders ~ lag(t_biders, 1) +lag(log(t_amount+1),1)+ weekday+request_number+overdue_number+repaid_number+nopaid_number+log(loan_amount+1)+log(loan_total+1)+user_month+age+gender+rate+loan_life_month+desc_length+title_length+repay_type+income+firm_scale+edu+occupation+marriage+job_length+grade+log(credit+1)+isestate+isestate_loan+iscar+iscar_loan
  2. > renren_random <- plm(form4, data = data, model = "random")
  3. > summary(renren_random)
  4. Oneway (individual) effect Random Effect Model
  5.    (Swamy-Arora's transformation)

  6. Call:
  7. plm(formula = form4, data = data, model = "random")

  8. Unbalanced Panel: n=342459, T=1-6, N=2039565

  9. Effects:
  10.                  var std.dev share
  11. idiosyncratic 0.6908  0.8311 0.196
  12. individual    2.8417  1.6857 0.804
  13. theta  :
  14.    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  15. 0.5578  0.8027  0.8027  0.8023  0.8027  0.8027

  16. Residuals :
  17.     Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
  18. -159.000   -0.030    0.003   -0.009    0.030  226.000

  19. Coefficients :
  20.                              Estimate  Std. Error   t-value  Pr(>|t|)   
  21. (Intercept)                1.9205e+01  6.7643e-01   28.3913 < 2.2e-16 ***
  22. lag(t_biders, 1)           2.5434e-01  6.9954e-04  363.5846 < 2.2e-16 ***
  23. lag(log(t_amount + 1), 1)  5.5273e-01  3.0442e-03  181.5657 < 2.2e-16 ***
  24. weekday                    3.6981e-03  2.0087e-03    1.8410 0.0656151 .  
  25. request_number            -1.7076e-02  2.3580e-03   -7.2415 4.438e-13 ***
  26. overdue_number            -1.5645e-02  1.1122e-02   -1.4067 0.1595182   
  27. repaid_number             -2.9952e-01  7.6353e-03  -39.2288 < 2.2e-16 ***
  28. nopaid_number              5.2061e+00  4.6915e-01   11.0970 < 2.2e-16 ***
  29. log(loan_amount + 1)       3.2357e-02  3.6205e-03    8.9370 < 2.2e-16 ***
  30. log(loan_total + 1)       -5.7871e-01  4.9410e-03 -117.1241 < 2.2e-16 ***
  31. user_month                -9.8023e-03  7.8359e-04  -12.5095 < 2.2e-16 ***
  32. age                        1.5335e-02  6.7982e-04   22.5572 < 2.2e-16 ***
  33. gender                     1.5732e-03  1.1209e-02    0.1404 0.8883828   
  34. rate                      -3.9678e-03  1.1880e-03   -3.3400 0.0008379 ***
  35. loan_life_month           -4.3588e-03  4.5372e-04   -9.6068 < 2.2e-16 ***
  36. desc_length                4.0769e-03  9.7201e-05   41.9433 < 2.2e-16 ***
  37. title_length              -1.0879e-02  1.0969e-03   -9.9178 < 2.2e-16 ***
  38. repay_type                 2.0886e+00  6.6687e-01    3.1319 0.0017369 **
  39. income                     7.3108e-02  2.9737e-03   24.5851 < 2.2e-16 ***
  40. firm_scale                -2.5688e-02  3.8693e-03   -6.6389 3.161e-11 ***
  41. edu                       -7.6334e-02  4.7044e-03  -16.2261 < 2.2e-16 ***
  42. occupation                -3.0348e-02  6.2655e-03   -4.8436 1.275e-06 ***
  43. marriage                  -8.1764e-03  7.5286e-03   -1.0860 0.2774613   
  44. job_length                -4.1467e-02  4.2155e-03   -9.8367 < 2.2e-16 ***
  45. grade                     -3.1355e+00  1.1345e-02 -276.3658 < 2.2e-16 ***
  46. log(credit + 1)            1.8067e-01  2.4535e-03   73.6375 < 2.2e-16 ***
  47. isestate                  -5.6168e-02  1.0724e-02   -5.2377 1.626e-07 ***
  48. isestate_loan             -2.3396e-01  1.5060e-02  -15.5347 < 2.2e-16 ***
  49. iscar                      8.3053e-02  1.2520e-02    6.6334 3.280e-11 ***
  50. iscar_loan                -2.8448e-01  2.2205e-02  -12.8120 < 2.2e-16 ***
  51. ---
  52. Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

  53. Total Sum of Squares:    3066500
  54. Residual Sum of Squares: 2430000
  55. R-Squared      :  0.20762
  56.       Adj. R-Squared :  0.20762
  57. F-statistic: 18421.1 on 29 and 2039535 DF, p-value: < 2.22e-16
复制代码



然后用within模型,结果只有两个滞后项的系数显示出来了,其他项目的系数都没有,不知道是什么原因?

  1. > renren_with <- plm(form4, data = data, model = "within")
  2. > summary(renren_with)
  3. Oneway (individual) effect Within Model

  4. Call:
  5. plm(formula = form4, data = data, model = "within")

  6. Unbalanced Panel: n=342459, T=1-6, N=2039565

  7. Residuals :
  8.    Min. 1st Qu.  Median 3rd Qu.    Max.
  9.    -176       0       0       0     186

  10. Coefficients :
  11.                              Estimate  Std. Error t-value  Pr(>|t|)   
  12. lag(t_biders, 1)          -0.14406663  0.00087849 -163.99 < 2.2e-16 ***
  13. lag(log(t_amount + 1), 1)  0.33537329  0.00252595  132.77 < 2.2e-16 ***
  14. ---
  15. Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

  16. Total Sum of Squares:    1196900
  17. Residual Sum of Squares: 1172300
  18. R-Squared      :  0.020528
  19.       Adj. R-Squared :  0.017082
  20. F-statistic: 17784.5 on 2 and 1697104 DF, p-value: < 2.22e-16
复制代码



二维码

扫码加我 拉你入群

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

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

关键词:固定效应模型 固定效应 plm coefficients coefficient 模型

沙发
joeatjifang 发表于 2015-3-1 20:16:59 |只看作者 |坛友微信交流群
补充一下,如果方程中不包括滞后项的话,结果显示如下:
  1. > form4<-t_biders ~ weekday+request_number+overdue_number+repaid_number+nopaid_number+loan_amount
  2. > renren_with <- plm(form4, data = data, model = "within")
  3. 错误于plm.fit(formula, data, model, effect, random.method, inst.method) :
  4.   empty model
复制代码

使用道具

藤椅
soccy 发表于 2015-3-1 23:19:23 |只看作者 |坛友微信交流群
在fixed effect模型中只有time varying的变量才会有系数

使用道具

板凳
面板数据啊啊啊啊啊啊啊 发表于 2020-6-12 17:14:53 来自手机 |只看作者 |坛友微信交流群
啊我也纠结了一上午,结果发现应该是excel的前两列顺序反了。应该先是state,再是T,而且刚好我的T是季度性的字符串,在第一列。。。。可能直接就按第一列growp了。。。

使用道具

报纸
xieruoqing 学生认证  发表于 2023-5-26 17:40:30 |只看作者 |坛友微信交流群
楼主解决了吗 我也遇到了。。

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

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

GMT+8, 2024-4-27 10:13