📄 prais.dlg
字号:
/*
prais
*! VERSION 1.1.2 12may2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht320
INCLUDE header
HELP hlp1, view("help prais")
RESET res1
DIALOG main, label("prais - Prais-Winsten and Cochrane-Orcutt regression") tabtitle("Model")
BEGIN
DEFINE _x _xsetbu
DEFINE _y _top
INCLUDE _bu_tsset
INCLUDE _dviv_ts4set
GROUPBOX gb_output _lft _ls _iwd _ht18, /*
*/ label("Options") /*
*/
GROUPBOX gb_rho _ilft _ms _ibwd _ht6, /*
*/ label("Method to compute autocorrelation") /*
*/
RADIO rb_reg _indent _ss _cwd3 ., /*
*/ label("Single-lag OLS of residuals") /*
*/ first /*
*/ option("rhotype(regress)") /*
*/
DEFINE y @y
RADIO rb_freg @ _ss @ ., /*
*/ label("Single-lead OLS of residuals") /*
*/ option("rhotype(freg)") /*
*/
RADIO rb_tscorr @ _ss @ ., /*
*/ label("Autocorrelation of residuals") /*
*/ option("rhotype(tscorr)") /*
*/
RADIO rb_dw _lft2 y @ ., /*
*/ label("Based on Durbin-Watson") /*
*/ option("rhotype(dw)") /*
*/
RADIO rb_theil @ _ss @ ., /*
*/ label("Adjusted autocorrelation") /*
*/ option("rhotype(theil)") /*
*/
RADIO rb_nagar @ _ss @ ., /*
*/ label("Adjusted Durbin-Watson") /*
*/ last /*
*/ option("rhotype(nagar)") /*
*/
CHECKBOX ck_corc _ilft _xls _cwd2 ., /*
*/ label("Corchrane-Orcutt transformation") /*
*/ option("corc") /*
*/
DEFINE y @y
CHECKBOX ck_sse @ _ms @ ., /*
*/ label("Search for rho that minimizes SSE") /*
*/ option("ssesearch") /*
*/ onclickon("main.ck_two.disable") /*
*/ onclickoff("main.ck_two.enable") /*
*/
CHECKBOX ck_two @ _ms @ ., /*
*/ label("Stop after the first iteration (twostep)") /*
*/ option("twostep") /*
*/ onclickon("main.ck_sse.disable") /*
*/ onclickoff("main.ck_sse.enable") /*
*/
CHECKBOX ck_nocons _lft2 y @ ., /*
*/ label("Suppress constant term") /*
*/ option("noconstant") /*
*/
CHECKBOX ck_hascon @ _ms @ ., /*
*/ label("Has user-supplied constant") /*
*/ option("hascons") /*
*/
CHECKBOX ck_space @ _ms @ ., /*
*/ label("Conserve memory during estimation") /*
*/ option("savespace") /*
*/
END
INCLUDE ifin
DIALOG robust, label("") tabtitle("SE/Robust")
BEGIN
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+*/
CHECKBOX ck_robust _lft _top _iwd _ht15, /*
*/ label("Robust standard errors") /*
*/ clickoff("script roboff") /*
*/ clickon("program robon") /*
*/ option("robust") /*
*/ groupbox /*
*/
TEXT tx_clust _indent _ss _inwd ., /*
*/ label("Cluster variable: (optional) ") /*
*/
VARNAME vn_clust @ _ss _vnwd ., /*
*/ label("Cluster variable") /*
*/ option("cluster") /*
*/
GROUPBOX gb_bias @ _xls _ibwd _ht6, /*
*/ label("Bias correction") /*
*/
RADIO rb_hc1 _indent _ss _en14wd ., /*
*/ first /*
*/ label("n/(n-k)") /*
*/ option("NONE") /*
*/ onclickon(robust.vn_clust.enable)
DEFINE rb_x @x
DEFINE rb_wd @cx
TEXT tx_hc1 _en14sep @ _en14r4c ., /*
*/ label("(default)") /*
*/
DEFINE txt_x @x
DEFINE txt_wd @cx
RADIO rb_hc2 rb_x _ss rb_wd ., /*
*/ label("1/(1-h)") /*
*/ option("hc2") /*
*/ onclickon(robust.vn_clust.disable)
TEXT tx_hc2 txt_x @ txt_wd ., /*
*/ label("(best for homoskedastic)") /*
*/
RADIO rb_hc3 rb_x _ss rb_wd ., /*
*/ last /*
*/ label("1/(1-h)^2") /*
*/ option("hc3") /*
*/ onclickon(robust.vn_clust.disable)
TEXT tx_hc3 txt_x @ txt_wd ., /*
*/ label("(best for heteroskedastic)") /*
*/
END
PROGRAM robon
BEGIN
call robust.gb_bias.enable
call robust.rb_hc1.enable
call robust.rb_hc2.enable
call robust.rb_hc3.enable
call robust.tx_hc1.enable
call robust.tx_hc2.enable
call robust.tx_hc3.enable
call robust.tx_clust.enable
if robust.rb_hc1 {
call robust.vn_clust.enable
}
END
SCRIPT roboff
BEGIN
robust.gb_bias.disable
robust.rb_hc1.disable
robust.rb_hc2.disable
robust.rb_hc3.disable
robust.tx_hc1.disable
robust.tx_hc2.disable
robust.tx_hc3.disable
robust.tx_clust.disable
robust.vn_clust.disable
END
DIALOG rpt, tabtitle("Reporting")
BEGIN
DEFINE _x _lft
DEFINE _cx _spr2b
DEFINE _y _top
INCLUDE _sp_level
CHECKBOX ck_nodw _lft _ls _iwd ., ///
label("Suppress reporting of the Durbin-Watson statistic") ///
option("nodw")
END
DIALOG max, tabtitle("Opt options")
BEGIN
BUTTON bu_hlp _xsetbu _top _setbuwd ., /*
*/label("Maximize Help") /*
*/onpush(script max_hlp)
SPINNER sp_iter _lft _top _spwd ., /*
*/ label("Maximum iterations") /*
*/ min(1) /*
*/ max(16000) /*
*/ default(c(maxiter)) /*
*/ option("iterate") /*
*/
TEXT tx_iter _spsep @ _spr2b ., /*
*/ label("Maximum iterations") /*
*/
GROUPBOX gb_log _lft _ls _cwd1 _ht6, /*
*/ label("Iteration log") /*
*/
DEFINE holdy @y
DEFINE cx @cx
DEFINE cy @cy
RADIO rb_default _indent _ss _inwd ., /*
*/ label("Default") /*
*/ first /*
*/ option(NONE)
RADIO rb_nolog @ _ss @ ., /*
*/ label("Suppress log") /*
*/ middle /*
*/ option(nolog)
RADIO rb_log @ _ss @ ., /*
*/ label("Show log") /*
*/ option(log) /*
*/ last
GROUPBOX gb_tol _lft2 holdy cx cy, /*
*/ label("Convergence tolerance") /*
*/
EDIT ed_tol _ilft2 _ms _en7wd ., /*
*/ label("Coefficient vector") /*
*/ option("tolerance") /*
*/
TEXT tx_tol _en7sep @ _en7r2b ., /*
*/ label("Coefficient vector") /*
*/
END
SCRIPT max_hlp
BEGIN
view help maximize##|_new
END
PROGRAM disable_max
BEGIN
call gaction max.sp_iter.disable
call gaction max.tx_iter.disable
call gaction max.gb_tol.disable
call gaction max.ed_tol.disable
call gaction max.tx_tol.disable
call gaction max.ed_ltol.disable
call gaction max.tx_ltol.disable
END
PROGRAM enable_max
BEGIN
call gaction max.sp_iter.enable
call gaction max.tx_iter.enable
call gaction max.gb_tol.enable
call gaction max.ed_tol.enable
call gaction max.tx_tol.enable
call gaction max.ed_ltol.enable
call gaction max.tx_ltol.enable
END
PROGRAM max_output
BEGIN
if !H(max.rb_default) {
option radio (max rb_default rb_nolog rb_log)
}
optionarg /hidedefault max.sp_iter
optionarg max.ed_tol
END
PROGRAM command
BEGIN
allowxi
put "prais "
varlist main.vn_dv [main.vl_iv]
INCLUDE _ifin_pr
beginoptions
option radio(main rb_reg rb_freg rb_tscorr rb_dw rb_theil rb_nagar)
option main.ck_corc
option main.ck_sse
option main.ck_two
option main.ck_nocons
option main.ck_hascon
option main.ck_space
if robust.ck_robust {
if robust.vn_clust {
if !robust.rb_hc1 {
stopbox stop /*
*/ `"Only "n/(n-k)" is allowed with a cluster variable"'
}
}
option robust.ck_robust
optionarg robust.vn_clust
option radio(robust rb_hc1 rb_hc2 rb_hc3)
}
optionarg /hidedefault rpt.sp_level
option rpt.ck_nodw
put /program max_output
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -