蓝色 发表于 2013-6-28 21:14 
请把3sls估计面版数据的命令写出来。
xtreg lny lnp1 lnk lnh lnl,fe
predict lny_hat, xb
gen lny_hat2=lny_hat*lny_hat
xtreg lnp1 lny_hat lny_hat2 lnx1 lnx2 lnx3 lnx4,fe
predict e1,e
xtreg lnp1 lny lny2 lnx1 lnx2 lnx3 lnx4,fe
predict lnp1_hat, xb
xtreg lny lnp1_hat lnk lnh lnl,fe
predict e2,e
bysor year:corr e1 e2,cov
此处如何把方差协方差阵保存?并作为下面两个方程的权重?
xtgls lnp1 lny lny2 lnx1 lnx2 lnx3 lnx4 [weight=a]
xtgls lny lnp1 lnk lnh lnl [weight=a]