📄 heckman_2step.dlg
字号:
/*
heckman , twostep
*! VERSION 1.1.1 21mar2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht330
INCLUDE header
HELP hlp1, view("help heckman")
RESET res1
DIALOG main, label("heckman - Heckman two-step selection model") ///
tabtitle("Model")
BEGIN
DEFINE _x _xsetbu
DEFINE _y _top
INCLUDE _bu_svyset
INCLUDE _dviv4set
CHECKBOX ck_nocons @ _ms @ ., ///
label("Suppress constant term") ///
option(noconstant)
CHECKBOX ck_sdv _lft _ls _vnwd ., ///
label("Selection DV:") ///
onclickon(gaction main.vn_sdv.enable) ///
onclickoff(gaction main.vn_sdv.disable)
DEFINE y @y
VARNAME vn_sdv @ _ss @ ., ///
label("Selection variable")
TEXT tx_siv _vlx y _vlwd ., ///
label("Selection independent variables:")
VARLIST vl_siv @ _ss @ ., ///
label("Selection independent variables") ///
allowcat
CHECKBOX ck_snocon @ _ms @ ., ///
label("Suppress selection constant term") ///
option(noconstant)
GROUPBOX gb_rho _lft _xls _iwd _ht9, ///
label("Treatment of inadmissible rho")
RADIO rb_sigma _indent _ms _inwd ., ///
first ///
label("Truncate to [-1,1] with consistent sigma") ///
option("rhosigma")
RADIO rb_trunc @ _ss @ ., ///
label("Truncate to [-1,1]") ///
option("rhotrunc")
RADIO rb_limit @ _ss @ ., ///
label("Limited truncate") ///
option("rholimited")
RADIO rb_force @ _ss @ ., ///
last ///
label("Retain") ///
option("rhoforce")
END
PROGRAM heckman_model_subopts
BEGIN
option main.ck_snocon
END
PROGRAM heckman_model_opts
BEGIN
if main.ck_sdv {
varlist main.vn_sdv
put " = "
}
require main.vl_siv
put " " main.vl_siv
if main.ck_snocon {
beginoptions
put /program heckman_model_subopts
endoptions
}
END
PROGRAM heckman_model_opts_output
BEGIN
option main.ck_nocons
put "twostep select("
put /program heckman_model_opts
put ")"
option radio(main rb_sigma rb_trunc rb_limit rb_force)
END
PROGRAM heckman_model_output
BEGIN
varlist main.vn_dv [main.vl_iv]
put " "
if !main.vl_iv & main.ck_nocons {
stopbox stop `""Suppress constant term" is selected without independent variables."'
}
END
INCLUDE byifin
INCLUDE se
SCRIPT PREINIT
BEGIN
script se_createAsH2step
END
DIALOG rpt, tabtitle("Reporting")
BEGIN
DEFINE _x _lft
DEFINE _cx _spr2b
DEFINE _y _top
INCLUDE _sp_level
CHECKBOX ck_first _lft _ls _cwd1 ., /*
*/ label("Report first-step probit estimates") /*
*/ option("first") /*
*/
GROUPBOX gb_genvar _lft +35 _iwd _ht4h, /*
*/ label("Generate new variables")
TEXT tx_nshaz _ilft _ss _inwd ., /*
*/ label("Nonselection hazard variable:") /*
*/
EDIT ed_nshaz @ _ss _vnwd ., /*
*/ label("Nonselection hazard") /*
*/ option("nshazard") /*
*/
END
PROGRAM command
BEGIN
allowxi
INCLUDE _by_pr
put "heckman "
put " " /program heckman_model_output
INCLUDE _ifin_pr
beginoptions
put " " /program heckman_model_opts_output
put " " /program se_output
optionarg /hidedefault rpt.sp_level
option rpt.ck_first
optionarg rpt.ed_nshaz
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -