楼主: hqu_sun
2494 3

[其他] TOBIP PANEL 中的u_i如何提取 [推广有奖]

  • 0关注
  • 4粉丝

教师

讲师

62%

还不是VIP/贵宾

-

威望
0
论坛币
8496 个
通用积分
0.0489
学术水平
3 点
热心指数
4 点
信用等级
1 点
经验
19659 点
帖子
398
精华
0
在线时间
543 小时
注册时间
2005-3-19
最后登录
2026-1-16

楼主
hqu_sun 在职认证  发表于 2007-6-17 22:31:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
<v:shapetype>
<P ><v:shapetype><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape><v:imagedata><v:shapetype></P></v:shapetype></v:imagedata></v:shape></v:shapetype> TOBIP PANEL 中的u_i如何提取 <BR>在STATA中,公式中的u_i如何提取,我说的是这个意思。
二维码

扫码加我 拉你入群

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

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

关键词:Panel TOBIP pane 如何提取 Stata 如何

沙发
arlionn 在职认证  发表于 2007-6-19 13:28:00

* Given by Arlion, Jinhe Center, Xi'an Jiaotong University.
* see Chapter 8 of Arlion's lecture, or Greene(2000, chp14)
* Blog: http://arlion.8j.cn
* Suggestions are welcome, E-mail: arlionn@163.com

use "D:\stata8\ado\Examples\XTFiles\invest2.dta", clear

* Note: This is an exercise to get ui by several differnt means

tsset id t

* ----method 1-----* using xtreg, fe command
qui xtreg mark inv stock , fe
predict ui , u
gen ui_fe = ui + _b[_cons] /*Because there is constant term in the fe model*/
// list ui_fe if time==1 /*The ui given by xtreg,fe command*/

* ----method 3-----* using formula
sort id t
foreach var of varlist inv mark stock{
by id: egen `var'_bar = mean(`var')
}
gen ui_formula = market_bar - _b[inv]*invest_bar - _b[stock]*stock_bar

* ----method 2-----* using dummy vars , see Greene(2000) chp14
qui tab id , gen(dum) /*Five dummy variables correponding five firms are gened*/
qui reg market invest stock dum* , nocons /*You must specify "noconstant" option here*/
mat ui_dum = (_b[dum1] \ _b[dum2] \ _b[dum3] \ _b[dum4] \ _b[dum5])

* display the results
dis _n in y "=======ui: xtreg,fe =========== "
list ui_fe if t==1
dis _n in y "=======ui: formula=========== "
list ui_formula if t==1
dis _n in y "=======ui: dummy variables =========== "
mat list ui_dum

藤椅
蓝色 发表于 2007-6-19 14:11:00

还是arlionn 高啊,

大家应该像他学学下。特别是现把他写的stata的讲义好好读一下。

不要怕化费这个时间,这是很必要的。

板凳
hqu_sun 在职认证  发表于 2007-6-19 15:37:00

谢谢二位,还有大家

我这里有SATA9的正版,单位的,

以后我会好好学的,

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-17 14:20