regress_estat.dlg
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· DLG 代码 · 共 498 行
DLG
498 行
/*
regress_estat
*! VERSION 1.0.1 30mar2005
***
USE EXTREME CARE WHEN CHANGING CONTROL NAMES. The names used
in this file have multiple external dependencies.
*/
VERSION 9.0
INCLUDE _std_large
DEFINE _dlght 360 //dialog length for bootstrap options
INCLUDE header
HELP hlp1, view("help regress postestimation")
RESET res1
DIALOG main, label("estat - Postestimation statistics for regress") tabtitle("Main")
BEGIN
TEXT tx_subcmd _lft _top _iwd ., ///
label("Reports and statistics: (subcommand)")
LISTBOX lb_subcmd @ _ss @ 70, ///
contents(main_subcommand_contents) ///
values(main_subcommand_values) ///
onselchangelist(main_subcommand_scripts)
DEFINE holdy 110
// hettest options
GROUPBOX gb_fit _lft holdy _iwd _ht6h, ///
label("Tests for heteroskedasticity")
RADIO rb_fit _ilft _ss _ibwd ., ///
first label("Use fitted values of the regression") ///
onclickon(main.vl_var.disable)
RADIO rb_var @ _ss @ ., ///
last label("Use the following variables:") ///
onclickon(main.vl_var.enable)
VARLIST vl_var _indent2 _ss _inwd ., ///
label("Use the following variables")
CHECKBOX ck_rhs _lft _xxls _iwd ., ///
option(rhs) ///
label("Use powers of the right-hand-side variables in the test")
CHECKBOX ck_mtest _lft _ls _iwd _ht4, ///
label("Perform multiple testing") groupbox ///
onclickon(script main_adjustment_on) ///
onclickoff(script main_adjustment_off)
TEXT tx_adjustment _ilft _ss _inwd ., ///
label("P-value adjustment:")
COMBOBOX cb_adjustment @ _ss 160 ., ///
label("Multiple testing adjustment") ///
dropdownlist ///
contents(adjustment_methods) ///
values(adjustment_values)
// imtest options
CHECKBOX ck_preserve _lft holdy _ibwd ., ///
option(preserve) ///
label("Preserve and restore original data in memory during auxiliary regression")
CHECKBOX ck_white @ _ms @ ., ///
option(white) ///
label("Perform White's original heteroskedasticity test")
// ovtest options - reuse rhs
// szroeter options - reuse hettest options
GROUPBOX gb_mtest _lft _ls _iwd _ht4, ///
label("Multiple testing")
// vif
TEXT tx_vifnote _lft holdy _iwd ., ///
label("Click OK or Submit to display variance inflation factors")
// time-series, archlm
CHECKBOX ck_lags _lft holdy _iwd ., ///
onclickon(main.ed_numlist.enable) ///
onclickoff(main.ed_numlist.disable) ///
label("Specify a list of lag orders to be tested:")
EDIT ed_numlist _indent2 _ss _ibwd ., ///
option(lags) ///
label("List of lag orders to be tested")
CHECKBOX ck_force _lft _ms _iwd ., ///
option(force) ///
label("Allow the test to be run after regress, robust")
// time-series, bgodfrey
CHECKBOX ck_nomiss0 _lft _ms @ ., ///
option(nomiss0) ///
label("Do not use Davidson and MacKinnon's approach")
GROUPBOX gb_pvalue _lft _ls _iwd _ht6, ///
label("P-value calculation")
RADIO rb_default_dist _ilft _ss _ibwd ., ///
first label("Obtain p-values using the default distribution")
RADIO rb_small @ _ss @ ., ///
option(small) ///
label("Obtain p-value using F or t distribution")
// time-series, durbinalt
RADIO rb_robust @ _ss @ ., ///
option(robust) last ///
label("Use robust/sandwich estimator and obtain p-values using the F or t distribution")
// time-series, dwatson
TEXT tx_dwatsonnote _lft holdy _iwd ., ///
label("Click OK or Submit to perform Durbin-Watson d statistic")
// Information criteria
TEXT tx_icnote _lft holdy _iwd ., ///
label("Click OK or Submit to display the AIC and BIC information criteria")
// Summarize options
GROUPBOX gb_eqlist _lft holdy _iwd _ht6, ///
label("Summarize")
RADIO rb_default _ilft _ss _inwd ., ///
first label("Use all variables involved in the estimation") ///
onclickon(main.vl_spec.disable)
RADIO rb_spec @ _ss @ ., ///
onclickon(main.vl_spec.enable) last ///
label("Use variables and optional equation names:")
VARLIST vl_spec _indent2 _ss _inwd ., ///
label("Use variables and optional equation names")
CHECKBOX ck_equation _lft +45 _iwd ., ///
option(equation) ///
label("Display summary by equation")
CHECKBOX ck_labels @ _ms @ ., ///
label("Display variable labels") ///
option(labels)
CHECKBOX ck_noheader _lft _ms _iwd ., ///
option(noheader) ///
label("Suppress the header")
CHECKBOX ck_noweights @ _ms @ ., ///
option(noweights) ///
label("Ignore weights")
INCLUDE estat_vce
INCLUDE _estat_bootstrap
END
INCLUDE _estat_bootstrap_pr
INCLUDE estat_vce_pr
SCRIPT main_group_on
BEGIN
main.sp_group.enable
main.tx_group.enable
END
SCRIPT main_group_off
BEGIN
main.sp_group.disable
main.tx_group.disable
END
LIST adjustment_methods
BEGIN
"None"
"Bonferroni's adjustment"
"Holm's adjustment"
"Sidak's adjustment"
END
LIST adjustment_values
BEGIN
mtest
mtest(bonferroni)
mtest(holm)
mtest(sidak)
END
LIST main_subcommand_contents
BEGIN
"Tests for heteroskedasticity (hettest)"
"Information matrix test (imtest)"
"Ramsey regression specification-error test for omitted variables (ovtest)"
"Szroeter's rank test for heteroskedasticity (szroeter)"
"Variance inflation factors for the independent variables (vif)"
"Test for ARCH effects in the residuals (archlm - time series only)"
"Breusch-Godfrey test (bgodfrey - time series only)"
"Durbin's alternative test (durbinalt - time series only)"
"Durbin-Watson d statistic (dwatson - time series only)"
"Information criteria (ic)"
"Summarize estimation sample (summarize)"
"Covariance matrix estimates (vce)"
END
LIST main_subcommand_values
BEGIN
hettest
imtest
ovtest
szroeter
vif
archlm
bgodfrey
durbinalt
dwatson
ic
summarize
vce
END
LIST main_subcommand_scripts
BEGIN
script sel_hettest
script sel_imtest
script sel_ovtest
script sel_szroeter
script sel_vif
script sel_archlm
script sel_bgodfrey
script sel_durbinalt
script sel_dwatson
script sel_ic
script sel_summarize
script sel_vce
END
SCRIPT sel_hettest
BEGIN
script main_hide_all
program hettest_on
END
SCRIPT sel_imtest
BEGIN
script main_hide_all
script imtest_on
END
SCRIPT sel_ovtest
BEGIN
script main_hide_all
script ovtest_on
END
SCRIPT sel_szroeter
BEGIN
script main_hide_all
script szroeter_on
END
SCRIPT sel_vif
BEGIN
script main_hide_all
main.tx_vifnote.show
END
SCRIPT sel_archlm
BEGIN
script main_hide_all
script archlm_on
END
SCRIPT sel_bgodfrey
BEGIN
script main_hide_all
program bgodfrey_on
END
SCRIPT sel_durbinalt
BEGIN
script main_hide_all
script durbinalt_on
END
SCRIPT sel_dwatson
BEGIN
script main_hide_all
main.tx_dwatsonnote.show
END
SCRIPT sel_ic
BEGIN
script main_hide_all
main.tx_icnote.show
END
SCRIPT sel_summarize
BEGIN
script main_hide_all
script main_summ_on
END
SCRIPT sel_vce
BEGIN
script main_hide_all
program vce_on
END
PROGRAM hettest_on
BEGIN
call main.gb_fit.show
call main.rb_fit.show
call main.rb_var.show
call main.vl_var.show
call main.ck_rhs.setposition . 220 . .
call main.ck_rhs.show
call main.ck_mtest.show
call main.tx_adjustment.show
call main.cb_adjustment.show
if ! main.ck_mtest {
call script main_adjustment_off
}
END
SCRIPT imtest_on
BEGIN
main.ck_preserve.show
main.ck_white.show
END
SCRIPT ovtest_on
BEGIN
main.ck_rhs.setposition . 110 . .
main.ck_rhs.show
END
SCRIPT szroeter_on
BEGIN
main.gb_fit.show
main.rb_fit.show
main.rb_var.show
main.vl_var.show
main.ck_rhs.setposition . 220 . .
main.ck_rhs.show
main.gb_mtest.setposition . 250 . .
main.gb_mtest.show
main.tx_adjustment.show
main.cb_adjustment.show
script main_adjustment_on
END
SCRIPT main_summ_on
BEGIN
main.ck_equation.show
main.ck_labels.show
main.ck_noheader.show
main.ck_noweights.show
main.gb_eqlist.show
main.rb_default.show
main.rb_spec.show
main.vl_spec.show
END
SCRIPT main_summ_off
BEGIN
main.ck_equation.hide
main.ck_labels.hide
main.ck_noheader.hide
main.ck_noweights.hide
main.gb_eqlist.hide
main.rb_default.hide
main.rb_spec.hide
main.vl_spec.hide
END
SCRIPT main_adjustment_on
BEGIN
main.cb_adjustment.enable
main.tx_adjustment.enable
END
SCRIPT main_adjustment_off
BEGIN
main.cb_adjustment.disable
main.tx_adjustment.disable
END
SCRIPT archlm_on
BEGIN
main.ck_lags.show
main.ed_numlist.show
main.ck_force.setposition . 160 . .
main.ck_force.setlabel "Allow the test to be run after regress, robust"
main.ck_force.show
END
PROGRAM bgodfrey_on
BEGIN
call main.ck_lags.show
call main.ed_numlist.show
call main.ck_nomiss0.setposition . 160 . .
call main.gb_pvalue.setposition . 185 . 70
call main.rb_default_dist.setposition . 205 . .
call main.rb_small.setposition . 225 . .
call main.ck_nomiss0.show
call main.gb_pvalue.show
call main.rb_default_dist.show
call main.rb_small.show
if main.rb_robust {
call main.rb_default_dist.seton
}
END
SCRIPT durbinalt_on
BEGIN
main.ck_lags.show
main.ed_numlist.show
main.ck_nomiss0.setposition . 160 . .
main.ck_force.setposition . 185 . .
main.gb_pvalue.setposition . 210 . 90
main.rb_default_dist.setposition . 230 . .
main.rb_small.setposition . 250 . .
main.rb_robust.setposition . 270 . .
main.ck_nomiss0.show
main.gb_pvalue.show
main.rb_default_dist.show
main.rb_robust.show
main.rb_small.show
main.ck_force.setlabel "Allow the test to be run after regress, robust or newey"
main.ck_force.show
END
SCRIPT main_hide_all // MUST BE IMPLEMENTED FOR BOOTSTRAP
BEGIN
main.gb_fit.hide
main.rb_fit.hide
main.rb_var.hide
main.vl_var.hide
main.ck_rhs.hide
main.ck_mtest.hide
main.gb_mtest.hide
main.tx_adjustment.hide
main.cb_adjustment.hide
main.ck_preserve.hide
main.gb_pvalue.hide
main.ck_white.hide
main.tx_vifnote.hide
main.ck_lags.hide
main.ed_numlist.hide
main.ck_force.hide
main.ck_nomiss0.hide
main.rb_default_dist.hide
main.rb_small.hide
main.rb_robust.hide
main.tx_dwatsonnote.hide
main.tx_icnote.hide
script main_summ_off
program vce_off
script main_bootstrap_hide
END
PROGRAM vl_output
BEGIN
put main.vl_spec
END
PROGRAM vl_eq_output
BEGIN
put main.vl_eq
END
PROGRAM command
BEGIN
put "estat "
put main.lb_subcmd
if main.rb_spec {
require main.vl_spec
put " " main.vl_spec
}
if main.rb_var & main.rb_var.isvisible() {
varlist main.vl_var
}
beginoptions
// non-basic options
option main.ck_rhs
if main.lb_subcmd.iseq("hettest") ///
| ( main.lb_subcmd.iseq("szroeter") ///
& ! main.cb_adjustment.iseq("mtest") ///
) ///
{
put " " main.cb_adjustment
}
option main.ck_preserve
option main.ck_white
// time-series options
if main.ck_lags {
require main.ed_numlist
optionarg main.ed_numlist
}
option main.ck_nomiss0
option main.rb_robust
option main.rb_small
option main.ck_force
// Summarize options
option main.ck_equation
option main.ck_labels
option main.ck_noheader
option main.ck_noweights
put " " /program vce_output
put " " /program bootstrap_output
endoptions
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?