📄 se.idlg
字号:
BEGIN
call script _se_hac_hide
if se_hasHAC & se_vcetype.equals("HAC") {
call script _se_hac_show
}
END
SCRIPT _se_hac_hide
BEGIN
se.tx_hac.hide
se.cb_hac.hide
se.ck_lag.hide
se.en_lag.hide
se.tx_t.hide
se.vn_t.hide
END
SCRIPT _se_hac_show
BEGIN
se.tx_hac.show
se.cb_hac.show
se.ck_lag.show
se.en_lag.show
se.tx_t.show
se.vn_t.show
END
PROGRAM _se_check_mse
BEGIN
call script _se_mse_hide
if se_vcetype.equals("Bootstrap") ///
| se_vcetype.equals("Jackknife") {
if se_noCluster {
call se.ck_mse.setposition . 185
}
call script _se_mse_show
}
END
SCRIPT _se_mse_hide
BEGIN
se.ck_mse.hide
END
SCRIPT _se_mse_show
BEGIN
se.ck_mse.show
END
PROGRAM _se_check_noadjust
BEGIN
call script _se_noadjust_hide
if se_hasNoAdjust {
if se_vcetype.equals("Clustered robust") {
call script _se_noAdjust_moveDown
call script _se_noadjust_show
}
if se_vcetype.equals("Robust") {
call script _se_noAdjust_moveUp
call script _se_noadjust_show
}
}
END
SCRIPT _se_noAdjust_moveUp
BEGIN
se.ck_noadjust.setposition . 160 . .
END
SCRIPT _se_noAdjust_moveDown
BEGIN
se.ck_noadjust.setposition . 210 . .
END
SCRIPT _se_noadjust_hide
BEGIN
se.ck_noadjust.hide
END
SCRIPT _se_noadjust_show
BEGIN
se.ck_noadjust.show
END
PROGRAM _se_check_nodots
BEGIN
call script _se_nodots_hide
if se_vcetype.equals("Bootstrap") ///
| se_vcetype.equals("Jackknife") {
if se_noCluster {
call se.ck_nodots.setposition . 160
}
call script _se_nodots_show
}
END
SCRIPT _se_nodots_hide
BEGIN
se.ck_nodots.hide
END
SCRIPT _se_nodots_show
BEGIN
se.ck_nodots.show
END
PROGRAM _se_check_notes
BEGIN
call script _se_notes_hide
call program _se_set_notes
if se_hasNotes ///
& se_notesVisible ///
& ( se_vcetype.equals("Default standard errors") ///
| se_vcetype.equals("Analytic") ///
| se_vcetype.equals("Newey's two-step") ///
| se_vcetype.equals("Heckman's two-step") ///
| se_vcetype.equals("Two-step") ///
| se_vcetype.equals("Two-stage") ///
| se_vcetype.equals("Ordinary least squares (OLS)") ///
| se_vcetype.equals("Linearized") ///
| (se_hasIOIM ///
& se_vcetype.equals("Observed information matrix (OIM)") ///
) ///
) {
call script _se_notes_show
}
END
SCRIPT _se_notes_hide
BEGIN
se.tx_note1.hide
se.tx_note2.hide
se.tx_note3.hide
END
SCRIPT _se_notes_show
BEGIN
se.tx_note1.show
se.tx_note2.show
se.tx_note3.show
END
SCRIPT _se_notes_moveUp
BEGIN
// NOTE: once used by -se_isGLM- and -se_isGEE-, keep this script for
// possible future use
se.tx_note1.setposition . 160 . .
se.tx_note2.setposition . 175 . .
se.tx_note3.setposition . 190 . .
END
SCRIPT _se_notes_moveDown
BEGIN
// NOTE: once used by -se_isGLM- and -se_isGEE-, keep this script for
// possible future use
se.tx_note1.setposition . 260 . .
se.tx_note2.setposition . 275 . .
se.tx_note3.setposition . 290 . .
END
PROGRAM _se_set_notes
BEGIN
call se.tx_note1.setlabel ""
call se.tx_note2.setlabel ""
call se.tx_note3.setlabel ""
if se_isWeighted {
if se_isPWon {
call program _se_notes_for_pweights
}
if !se_isPWon {
call program _se_notes_for_nonpweights
}
}
if !se_isWeighted {
call program _se_notes_for_noweights
}
END
PROGRAM _se_notes_for_pweights
BEGIN
if se_hasRobust & se_hasJackknife {
call se.tx_note1.setlabel ///
"Note: Only robust and jackknife standard errors are available when sampling"
call se.tx_note2.setlabel ///
"weights have been selected. By default robust is used."
}
if !se_hasRobust & se_hasJackknife {
call se.tx_note1.setlabel ///
"Note: Only jackknife standard errors are available as an alternative when"
call se.tx_note2.setlabel ///
"sampling weights have been selected."
}
if se_vcetype.equals("Bootstrap") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "Bootstrap" standard errors"' ///
`"have been deselected because they are not allowed with "Sampling weights""'
}
if se_vcetype.equals("Observed information matrix (OIM)") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "OIM" standard errors"' ///
`"have been deselected because they are not allowed with "Sampling weights""'
}
if se_vcetype.equals("Outer product gradient (OPG)") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "OPG" standard errors"' ///
`"have been deselected because they are not allowed with "Sampling weights""'
}
if se_vcetype.equals("Generalized least squares (GLS)") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "GLS" standard errors"' ///
`"have been deselected because they are not allowed with "Sampling weights""'
}
if se_vcetype.equals("Expected information matrix (EIM)") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "EIM" standard errors"' ///
`"have been deselected because they are not allowed with "Sampling weights""'
}
END
PROGRAM _se_notes_for_nonpweights
BEGIN
if se_vcetype.equals("Bootstrap") {
call se_vcetype.setstring "Default standard errors"
stopbox note ///
`"On the "SE/Robust" tab, "Bootstrap" standard errors"' ///
`"have been deselected because they are not allowed with weights"'
}
call program _se_notes_for_noweights
END
PROGRAM _se_notes_for_noweights
BEGIN
if se_default_vcetype.equals("OIM") {
call se.tx_note1.setlabel ///
"Note: Based on the optimization technique, the current default is OIM."
}
if se_default_vcetype.equals("IOIM") {
call se.tx_note1.setlabel "Note: The default is OIM."
}
if se_default_vcetype.equals("Analytic") {
call se.tx_note1.setlabel "Note: The default is analytic."
}
if se_default_vcetype.equals("Newey's two-step") {
call se.tx_note1.setlabel ///
"Note: The default is Newey's two-step."
}
if se_default_vcetype.equals("Heckman's two-step") {
call se.tx_note1.setlabel ///
"Note: The default is Heckman's two-step."
}
if se_default_vcetype.equals("Two-step") {
call se.tx_note1.setlabel ///
"Note: The default is two-step."
}
if se_default_vcetype.equals("Two-stage") {
call se.tx_note1.setlabel "Note: The default is two-stage."
}
if se_default_vcetype.equals("OLS") {
call se.tx_note1.setlabel "Note: The default is OLS."
}
if se_default_vcetype.equals("Linearized") {
call se.tx_note1.setlabel "Note: The default is linearized."
}
if se_default_vcetype.equals("OPG") {
call se.tx_note1.setlabel ///
"Note: Based on the optimization technique, the current default is OPG."
}
if se_default_vcetype.equals("GLS") {
call se.tx_note1.setlabel "Note: The default is GLS."
}
if se_default_vcetype.equals("EIM") {
call se.tx_note1.setlabel ///
"Note: Based on the optimization method, the current default is EIM."
}
END
PROGRAM _se_check_vfactor
BEGIN
call script _se_vfactor_hide
if se_isGLM {
call script _se_vfactor_show
if ! se_isIRLS {
call script _se_disp_disable
}
if se_isIRLS {
call script _se_disp_enable
}
}
END
SCRIPT _se_vfactor_hide
BEGIN
se.gb_vadj.hide
se.tx_vfact.hide
se.en_vfact.hide
se.tx_disp.hide
se.en_disp.hide
se.tx_disp2.hide
END
SCRIPT _se_vfactor_show
BEGIN
se.gb_vadj.show
se.tx_vfact.show
se.en_vfact.show
se.tx_disp.show
se.en_disp.show
se.tx_disp2.show
END
SCRIPT _se_disp_disable
BEGIN
se.tx_disp.disable
se.en_disp.disable
se.tx_disp2.disable
END
SCRIPT _se_disp_enable
BEGIN
se.tx_disp.enable
se.en_disp.enable
se.tx_disp2.enable
END
PROGRAM _se_check_robust
BEGIN
if se_vcetype.equals("Robust") {
stopbox note ///
`"On the "SE/Robust" tab, "Robust" standard errors have been"' ///
`"deselected because they are not allowed with the last option selected"'
call se_vcetype.setstring "Default standard errors"
}
call program _se_check_ClRobust
END
PROGRAM _se_check_ClRobust
BEGIN
if se_vcetype.equals("Clustered robust") {
stopbox note ///
`"On the "SE/Robust" tab, "Clustered robust" standard errors have been"' ///
`"deselected because they are not allowed with the last option selected"'
call se_vcetype.setstring "Default standard errors"
}
END
PROGRAM _se_restore_vcetype
BEGIN
if se_old_default_vcetype.equals("OIM") {
call se_default_vcetype.setstring "OIM"
}
if se_old_default_vcetype.equals("OPG") {
call se_default_vcetype.setstring "OPG"
}
if se_old_default_vcetype.equals("EIM") {
call se_default_vcetype.setstring "EIM"
}
END
// DIALOG definition ********************************************************
DIALOG se, tabtitle("SE/Robust")
BEGIN
TEXT tx_type _lft _top _iwd ., ///
label("Standard error type:")
LISTBOX lb_vcetype _lft _ss 225 120, ///
contents(se_type_list) ///
values(se_type_values) ///
onselchangelist(se_type_actions)
TEXT tx_cluster @ 160 @ ., ///
label("Cluster variable: (optional)")
DEFINE holdy @y
VARNAME vn_cluster @ _ss _vnwd ., ///
label("Cluster variable") ///
option(cluster)
DEFINE holdy2 @y
CHECKBOX ck_noadjust @ _ls _vlwd ., ///
label("Standard degree-of-freedom adjustment (default)") ///
option("noadjust") ///
default(1)
TEXT tx_note1 _lft holdy _iwd .,
TEXT tx_note2 @ _vss @ .,
TEXT tx_note3 @ _vss @ .,
CHECKBOX ck_nodots @ 210 _cwd1 ., ///
label("Suppress replication dots") option(nodots)
CHECKBOX ck_mse @ 235 @ ., ///
option(mse) ///
label("Use MSE formula for variance")
CHECKBOX ck_bca @ 260 @ ., ///
option(bca) ///
label("Compute acceleration for BCa CIs")
SPINNER sp_reps _lft2 210 _spwd ., ///
default(50) min(2) max(1000000) option(reps)
TEXT tx_reps _spsep @ 150 ., ///
label("Replications")
EDIT ed_seed _lft2 _ls _spwd ., ///
numonly option(seed)
TEXT tx_seed _spsep @ 150 ., ///
label("Random-number seed")
GROUPBOX gb_bias _lft holdy _iwd _ht6, ///
label("Bias correction")
RADIO rb_hc1 _indent _ss _en14wd ., ///
first label("n/(n-k)") option(NONE)
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)
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)
TEXT tx_hc3 txt_x @ txt_wd ., ///
label("(best for heteroskedastic)")
TEXT tx_hac _lft holdy _cwd3_0 ., ///
label("Kernel:")
COMBOBOX cb_hac @ _ss _vnwd ., ///
label("Kernel") ///
contents(se_hac_list) ///
values(se_hac_values) ///
dropdown
CHECKBOX ck_lag _lft _ls _cwd3_0 ., ///
onclickon(program se_lag_check) ///
onclickoff(program se_lag_check) ///
label("Maximum lag: (default: N-2)")
EDIT en_lag @ _ss _vnwd ., ///
numonly ///
label("Maximum lag")
TEXT tx_t _lft _ms _cwd3_0 ., ///
label("Time variable:")
VARNAME vn_t @ _ss _vnwd ., ///
label("Time variable") ///
option(t)
GROUPBOX gb_vadj _lft2 _top _cwd1 _ht9, ///
label("Other optional variance adjustments")
TEXT tx_vfact _indent _ss _inwd ., ///
label("Factor to multiply the variance by:")
EDIT en_vfact @ _ss _en7wd ., ///
label("Factor to multiply the variance by") ///
numonly ///
option(vfactor)
TEXT tx_disp @ _ls _cwd3 ., ///
label("Quasi-likelihood multiplier: (IRLS only)")
EDIT en_disp @ _ss _en7wd ., ///
label("Quasi-likelihood multiplier") ///
numonly ///
option(disp)
TEXT tx_disp2 _en7sep @ _en7r2b ., ///
label("[disp() option]")
GROUPBOX gb_scale _lft2 _xls _cwd1 110, ///
label("Scale value choices")
RADIO rb_deflt _indent _ss _inwd ., ///
label("Default for chosen family") ///
onclickon(program _se_check_scale_value) ///
first ///
option(NONE)
RADIO rb_x2 @ _ss @ ., ///
label("Pearson chi-squared over d.f.") ///
onclickon(program _se_check_scale_value) ///
option("scale(x2)")
RADIO rb_dev @ _ss @ ., ///
label("Deviance over degrees of freedom") ///
onclickon(program _se_check_scale_value) ///
option("scale(dev)")
RADIO rb_phi @ @ @ ., ///
label("Do not rescale the variance") ///
onclickon(program _se_check_scale_value) ///
option("scale(phi)")
RADIO rb_value @ _ss _rbwd ., ///
onclickon(program _se_check_scale_value) ///
last ///
option(NONE)
EDIT en_value _rbsep @ _en7wd ., ///
label("User-supplied scale") ///
numonly ///
option(scale)
TEXT tx_value _en7sep @ _rben7r2b ., ///
label("User-supplied scale")
GROUPBOX gb_factor _lft2 _top _cwd1 _ht6, ///
label("Scale factors")
RADIO rb_default _indent _ss _inwd ., ///
label("Divisor N (default)") ///
first
RADIO rb_nmp @ _ss @ ., ///
label("Use divisor N-P instead of N [nmp]") ///
option("nmp")
RADIO rb_rgf @ _ss @ ., ///
label("Adjust the variance by (N-1)/(N-P) [rgf]") ///
option("rgf") ///
last
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -