var.dlg
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· DLG 代码 · 共 220 行
DLG
220 行
/*
var
*! VERSION 1.1.0 02mar2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht260
INCLUDE header
HELP hlp1, view("help var")
RESET res1
DIALOG main, label("var - Vector autoregression models") /*
*/ tabtitle("Model")
BEGIN
INCLUDE _tsdepvars
CHECKBOX ck_nocons _lft _ms _cwd1 ., /*
*/ label("Suppress the constant term") /*
*/ option("noconstant")
GROUPBOX gb_lags _lft _ls _iwd _ht5, /*
*/ label("Lags")
RADIO rb_lags1 _ilft _ss _rbvnr4c ., first /*
*/ clickon("script one2n") /*
*/ label("Include lags 1 to:")
DEFINE holdy @y
SPINNER sp_lags1 _indent2 _ms _spwd ., /*
*/ min(1) max(c(N)) default(2) /*
*/ label("Include lags 1 to:")
RADIO rb_lags2 _lft2 holdy _rbvnr4c ., last /*
*/ clickon("script laglist") /*
*/ label(`"Supply list of lags: (e.g. "2 5 7")"')
EDIT ed_lags2 _indent2 _ms _vnwd ., /*
*/ option("lags") /*
*/ label("Supply list of lags")
CHECKBOX ck_exog _lft _xxls _cwd1 ., /*
*/ label("Exogenous variables:") /*
*/ onclickon(gaction main.vl_exog.enable) /*
*/ onclickoff(gaction main.vl_exog.disable)
VARLIST vl_exog _indent2 _ss _ibwd ., allowts /*
*/ label("Exogenous variables") /*
*/ option("exog")
END
SCRIPT one2n
BEGIN
main.sp_lags1.enable
main.ed_lags2.disable
END
SCRIPT laglist
BEGIN
main.ed_lags2.enable
main.sp_lags1.disable
END
DIALOG opt, tabtitle("Model 2")
BEGIN
/* column 1 */
CHECKBOX ck_constr _lft _top _cwd1 _ht15h, /*
*/ groupbox /*
*/ label("Constraints") /*
*/ onclickon(program constr_on) /*
*/ onclickoff(script constr_off)
COMBOBOX cb_constr _indent _ms _cwd3 ., /*
*/ append /*
*/ dropdown /*
*/ contents(constraint) /*
*/ label("Constraints") /*
*/ option("constraints")
RADIO rb_sure @ _ls _cwd3 ., first /*
*/ label("Use iterated SURE") /*
*/ onclickon(program sure)
CHECKBOX ck_nolog _indent2 _ss _cwd5 ., /*
*/ label("Suppress SURE iteration log") /*
*/ option(nolog)
DEFINE holdy @y
DEFINE holdx @x
SPINNER sp_iter @ _ms _spwd ., /*
*/ label("iterate") /*
*/ min(1) /*
*/ max(1600) /*
*/ default(1600) /*
*/ option("iterate")
TEXT tx_sep _spsep @ 100 ., /*
*/ label("Maximum iterations")
EDIT ed_tol holdx _ms _en7wd ., /*
*/ option("tolerance") /*
*/ default(.000001) /*
*/ numonly /*
*/ label("Convergence tolerance")
TEXT tx_tol _en7sep @ 130 ., /*
*/ label("Convergence tolerance")
RADIO rb_noisure _ilft _ls _cwd3 ., last /*
*/ label("Use one-step SURE") /*
*/ onclickon(script noisure) /*
*/ option(noisure)
GROUPBOX gb_adv _lft +35 _iwd _ht2, /*
*/ label("Advanced")
CHECKBOX ck_nobigf _ilft _ss _ibwd ., /*
*/ label("Do not compute parameter vector for coefficients implicitly set to zero")/*
*/ option(nobigf)
/* column 2 */
CHECKBOX ck_dfk _lft2 _top _cwd1 ., /*
*/ label("Small sample d.f. adjustment") /*
*/ option(dfk)
CHECKBOX ck_small @ _ms @ ., /*
*/ label("Report small sample t and F statistics") /*
*/ option(small)
END
INCLUDE byifin
DIALOG rpt, tabtitle("Reporting")
BEGIN
DEFINE _x _lft
DEFINE _cx _spr2
DEFINE _y _top
INCLUDE _sp_level
GROUPBOX gb_tests _lft _ls _iwd _ht2, /*
*/ label("Additional test statistics")
CHECKBOX ck_luts _ilft _ss _cwd1 ., /*
*/ option(lutstats) /*
*/ label("Report Lutkepohl lag-order selection statistics")
END
PROGRAM constr_on
BEGIN
call gaction opt.cb_constr.enable
call gaction opt.rb_sure.enable
call gaction opt.rb_noisure.enable
if opt.rb_sure {
call gaction opt.ck_nolog.enable
call gaction opt.sp_iter.enable
call gaction opt.tx_sep.enable
call gaction opt.ed_tol.enable
call gaction opt.tx_tol.enable
}
END
SCRIPT constr_off
BEGIN
opt.cb_constr.disable
opt.rb_sure.disable
opt.ck_nolog.disable
opt.sp_iter.disable
opt.tx_sep.disable
opt.ed_tol.disable
opt.tx_tol.disable
opt.rb_noisure.disable
END
PROGRAM sure
BEGIN
if opt.ck_constr {
call gaction opt.ck_nolog.enable
call gaction opt.sp_iter.enable
call gaction opt.tx_sep.enable
call gaction opt.ed_tol.enable
call gaction opt.tx_tol.enable
}
END
SCRIPT noisure
BEGIN
opt.ck_nolog.disable
opt.sp_iter.disable
opt.tx_sep.disable
opt.ed_tol.disable
opt.tx_tol.disable
END
PROGRAM command
BEGIN
INCLUDE _by_pr
put "var"
varlist main.vl_dv
INCLUDE _ifin_pr
beginoptions
option main.ck_nocons
if main.rb_lags1 {
put "lags(1/"
put main.sp_lags1
put ") "
}
if main.rb_lags2 {
require main.ed_lags2
optionarg main.ed_lags2
}
if main.ck_exog {
require main.vl_exog
optionarg main.vl_exog
}
if opt.ck_constr {
require opt.cb_constr
optionarg opt.cb_constr
}
option opt.ck_nobigf
option opt.rb_noisure
optionarg /hidedefault opt.sp_iter
optionarg /hidedefault opt.ed_tol
option opt.ck_nolog
option opt.ck_small
option opt.ck_dfk
optionarg /hidedefault rpt.sp_level
option rpt.ck_luts
endoptions
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?