📄 xtpcse.dlg
字号:
/*
xtpcse
*! VERSION 1.1.0 28mar2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht340
INCLUDE header
HELP hlp1, view("help xtpcse")
RESET res1
DIALOG main, ///
label("xtpcse - Linear regression with panel-corrected standard errors") ///
tabtitle("Model")
BEGIN
DEFINE _x _xsetbu
DEFINE _y _top
INCLUDE _bu_tsset
INCLUDE _dviv_ts4set
CHECKBOX ck_nocons @ _ms @ ., ///
label("Suppress constant term") ///
option(noconstant)
GROUPBOX gb_corr _lft _ss _iwd _ht2, ///
label("Form of autocorrelation")
RADIO rb_indep _ilft _ss _cwd3_1 ., ///
label("No autocorrelation") ///
first ///
option(NONE)
RADIO rb_ar1 _lft3_2 @ 80 ., ///
label("AR(1)") ///
option("correlation(ar1)")
RADIO rb_psar1 _lft4_3 @ _cwd2 ., ///
label("Panel-specific AR(1)") ///
last ///
option("correlation(psar1)")
GROUPBOX gb_rho _lft _xls _iwd _ht6, ///
label("Method to compute autocorrelation")
RADIO rb_reg _indent _ss _cwd2 ., ///
label("Single lag OLS of residuals") ///
first ///
option(NONE)
DEFINE y @y
RADIO rb_freg @ _ss @ ., ///
label("Single lead OLS of residuals") ///
option("rhotype(freg)")
RADIO rb_tscorr _lft2 y @ ., ///
label("Autocorrelation of residuals") ///
option("rhotype(tscorr)")
RADIO rb_dw @ _ss @ ., ///
label("Based on Durbin-Watson") ///
last ///
option("rhotype(dw)")
CHECKBOX ck_np1 _ilft _ss _ibwd ., ///
label("Weight panel-specific autocorrelations by panel sizes (T_i) rather than T_i-1") ///
option("np1")
GROUPBOX gb_errors _lft _xls _iwd _ht6, ///
label("Errors")
RADIO rb_default _ilft _ss _ibwd ., ///
label("Panel-level heteroskedastic and correlated across panels (default)") ///
first
RADIO rb_hetonly @ _ss _cwd2 ., ///
label("Panel-level heteroskedastic") ///
option(hetonly)
RADIO rb_independ @ _ss @ ., ///
label("Independent across panels") ///
option(independent) ///
last
END
DEFINE fromwd 100
DEFINE fromsep +105
DEFINE towd 15
DEFINE tosep +25
DIALOG sub, label("") tabtitle("by/if/in")
BEGIN
GROUPBOX gb_incl _lft _top _iwd _ht2, ///
label("Observations to include")
RADIO rb_case _indent _ss _cwd2 ., ///
label("Only complete cases (default)") ///
first ///
option(NONE)
RADIO rb_pair _lft2 @ @ ., ///
label("All available nonmissing pairs") ///
last ///
option(pairwise)
GROUPBOX gb_byifin _lft _xxls _iwd _ht16, ///
label("by/if/in")
CHECKBOX ck_by _ilft _ms _inwd ., ///
label("Repeat command for groups defined by:") ///
onclickon(program sub_byon) ///
onclickoff(gaction sub.vl_by.disable)
VARLIST vl_by _indent2 _ss _inwd ., ///
label("Repeat command for groups defined by")
GROUPBOX gb_sub _ilft _ls _ibwd _ht7h, ///
label("Restrict to observations")
TEXT tx_if _indent _ss _inwd ., ///
label("If: (expression)")
EXP ex_if @ _ss @ ., ///
label("Create...")
CHECKBOX ck_in @ _ls fromwd ., ///
label("Obs. in range:") ///
onclickon("program sub_inon") ///
onclickoff("script sub_inoff")
SPINNER sp_from fromsep @ _spwd ., ///
min(1) ///
max(c(N)) ///
default(1)
TEXT tx_to _spsep @ towd ., ///
label("to:") ///
right
SPINNER sp_to tosep @ _spwd ., ///
min(1) ///
max(c(N)) ///
default(c(N))
END
PROGRAM sub_byon
BEGIN
if !H(sub.ck_in) & sub.ck_in {
call gaction sub.ck_by.setoff
stopbox stop `"On by/if/in tab, the two checkboxes may not be used together"'
}
call gaction sub.vl_by.enable
END
PROGRAM sub_inon
BEGIN
if !H(sub.ck_by) & sub.ck_by {
call gaction sub.ck_in.setoff
stopbox stop `"On by/if/in tab, the two checkboxes may not be used together"'
}
call gaction sub.sp_from.enable
call gaction sub.tx_to.enable
call gaction sub.sp_to.enable
END
SCRIPT sub_inoff
BEGIN
sub.sp_from.disable
sub.sp_to.disable
END
INCLUDE weights_ai
DIALOG robust, tabtitle("SE")
BEGIN
TEXT tx_desc _lft _top _iwd ., ///
label("Many of the options on the Model tab deal with standard errors.")
TEXT tx_desc2 _lft _vss _iwd ., ///
label("In addition, there is the following:")
CHECKBOX ck_nmk _lft _ls _iwd ., ///
label("Normalize standard errors by N-k instead of N") ///
option("nmk")
END
DIALOG rpt, tabtitle("Reporting")
BEGIN
DEFINE _x _lft
DEFINE _cx _spr2b
DEFINE _y _top
INCLUDE _sp_level
CHECKBOX ck_detail _lft _ls _cwd1 ., ///
label("Report list of gaps in time series") ///
option("detail")
END
PROGRAM command
BEGIN
allowxi
if sub.ck_by {
bysort sub.vl_by
}
put "xtpcse "
varlist main.vn_dv [main.vl_iv]
if !main.vl_iv & main.ck_nocons {
stopbox stop `""Suppress constant term" is selected without independent variables."'
}
INCLUDE _weights_pr
ifexp sub.ex_if
if sub.ck_in {
inrange sub.sp_from sub.sp_to
}
beginoptions
option main.ck_nocons
option radio(main rb_indep rb_ar1 rb_psar1)
option radio(main rb_reg rb_freg rb_tscorr rb_dw)
option main.ck_np1
option main.rb_hetonly
option main.rb_independ
option radio(sub rb_case rb_pair)
option robust.ck_nmk
optionarg /hidedefault rpt.sp_level
option rpt.ck_detail
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -