全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2487 3
2007-06-17
<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如何提取,我说的是这个意思。
二维码

扫码加我 拉你入群

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

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

全部回复
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的讲义好好读一下。

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

二维码

扫码加我 拉你入群

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

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

2007-6-19 15:37:00

谢谢二位,还有大家

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

以后我会好好学的,

二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群