你没有看看帮助吗。
Setup
. webuse abdata
First-differenced estimator
. xtivreg n l2.n l(0/1).w l(0/2).(k ys) yr1981-yr1984 (l.n = l3.n), fd
-------------------------------------------------------------------------------------------------------
Setup
. webuse nlswork
. generate age2 = age^2
Fixed-effects model
. xtivreg ln_w age* not_smsa (tenure = union south), fe
GLS random-effects model
. generate byte black = (race==2)
. xtivreg ln_w age* not_smsa black (tenure = union birth south), re