我想用XTPMG 的指令,可是不能成功的安8,有那位高手可幫助一下?
這是在STATA中顯示的東西
*********************************************************
. use "C:\Users\Nik\Desktop\jasa2.dta", clear
. tsset id year
panel variable: id (unbalanced)
time variable: year, 1960 to 1993
delta: 1 unit
. capture program drop xtpmg_ml
.
.
.
. program define xtpmg_ml
1.
. version 9
2.
. args todo b lnf
3.
. tempname beta ttl touse
4.
. marksample touse
5.
. mleval `beta' = `b'
6.
. tempname ec
7.
. quie generate double `ec'=$LRy-`beta'
8.
. scalar `ttl'=0
9.
. ml hold
10.
. foreach ivar of global iis{
11.
. quie regress $SRy $SRx `ec' if `touse' & `_dta[iis]'==`ivar', $nocons
12.
. scalar `ttl' = `ttl' + e(ll)
13.
. }
14.
. ml unhold
15.
. scalar `lnf' = `ttl'
16.
. end. xtpmg d.c d.pi d.y if year>=1962, lr(l.c pi y) ec(ec) full pmg
unrecognized command: xtpmg
r(199);
*************************