提供一个例子,供参考:
*--------
*-6.2.1.3 范例3:一般化部分调整模型
*
* 连玉君,钟经樊.
* 中国上市公司资本结构动态调整机制研究.
* 南方经济,2007,(01):23-38.
*
* 模型:Y_t - Y_t-1 = A(Yo_t - Y_t-1) 0<A<1
* Yo_t = Xb
* = b0 + b1*x1 + b2*x2 + ...
* A = Zr
* = r0 + r1*z1 + r2*z2 + ...
*
* 变形:Y_t = A*Yo_t + (1-A)*Y_t-1
doedit nldycs3.ado
*--------------------nldycs3.ado-------------------begin-----
*
*! the program for paper《上市公司资本结构动态调整》
*
cap program drop nldycs3
program define nldycs3
version 8.0
if "`1'"=="?" {
#delimit ;
global S_1 "a_fr a_sz a_nd a_tg a_np a_tr a_ag a_tb a_0
b_sz b_tr b_tb b_0";
#delimit cr
global S_2 "Estimaion for dynamic capital structure"
global a_fr = -0.0313
global a_sz = 0.0328
global a_nd = -0.2929
global a_tg = -0.0211
global a_np = -0.3703
global a_tr = -0.03489
global a_ag = 0.01184
global a_tb = -0.02732
global a_0 = 0.1278
global b_sz = 44.6969
global b_tb = 45.48
global b_tr = -89.32
global b_0 = -1050.3975
exit
}
#delimit ;
replace tl_star = $a_fr*fr +$a_sz*size +$a_nd*ndts
+$a_tg*tang +$a_np*npr+$a_tr*tshr
+$a_ag*age +$a_tb*tobin +$a_0;
replace alpha = $b_tb*tobin +$b_tr*tshr +$b_sz*size +$b_0;
#delimit cr
replace `1' = alpha*tl_star + (1-alpha)*tl_lag
end
*
*--------------------nldycs3.ado-------------------over------
use B3_dycs.dta, clear
gen tl_star = 0
gen alpha = 0
*-执行
nl dycs3 tl