📄 xtpoisson.dlg
字号:
/*
xtpoisson
*! VERSION 1.1.5 23jun2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_glm
INCLUDE _ht320
INCLUDE header
HELP hlp1, view("help xtpoisson")
RESET res1
DIALOG main, ///
label("xtpoisson - Fixed-, random-effects, and population-averaged Poisson models") ///
tabtitle("Model")
BEGIN
DEFINE _x _xsetbu
DEFINE _y _top
INCLUDE _bu_panelset
INCLUDE _dviv_ts4set
CHECKBOX ck_nocons @ _ms @ ., /*
*/ label("Suppress constant term") /*
*/ option("noconstant") /*
*/
GROUPBOX gb_model _lft _ms _iwd _ht2, /*
*/ label("Model type (affects which options are available)") /*
*/
RADIO rb_re _ilft _ss _cwd3_2 ., /*
*/ label("Random-effects (RE)") /*
*/ clickon("script re_opts") /*
*/ first /*
*/ option("re") /*
*/
RADIO rb_fe _ilft3_2 @ @ ., /*
*/ label("Fixed-effects (FE)") /*
*/ clickon("script fe_opts") /*
*/ option("fe") /*
*/
RADIO rb_pa _ilft3_3 @ @ ., /*
*/ label("Population-averaged (PA)") /*
*/ clickon("script pa_opts") /*
*/ last /*
*/ option("pa") /*
*/
GROUPBOX gb_opts _lft _xls _iwd _ht12, /*
*/ label("Options") /*
*/
RADIO rb_expose _ilft _ss _cwd4_1 ., /*
*/ label("Exposure variable:") /*
*/ first /*
*/ clickon("script expose") /*
*/
RADIO rb_offset _ilft4_2 @ @ ., /*
*/ label("Offset variable:") /*
*/ last /*
*/ clickon("script offset") /*
*/
VARNAME vn_expose _ilft _ss _cwd4_1 ., /*
*/ label("Exposure variable") /*
*/ option("exposure") /*
*/
VARNAME vn_offset _ilft4_2 @ @ ., /*
*/ label("Offset variable") /*
*/ option("offset") /*
*/
CHECKBOX ck_normal _ilft _ls _ibwd ., /*
*/ onclickon(program main_normal_on) /*
*/ onclickoff(script main_normal_off) /*
*/ option(normal) /*
*/ label("Use normal distribution for random effects (default = gamma)")
DEFINE _x _ilft
DEFINE _cx _ibwd
DEFINE _y _ms
INCLUDE _constraints
END
INCLUDE intopts_re
PROGRAM main_normal_on
BEGIN
if main.ck_normal {
call script intopts_re_enable
call script intopts_re_reset
script max_ml_on
}
END
SCRIPT main_normal_off
BEGIN
script intopts_re_disable
script max_ml_on
main.tx_constr.enable
main.cb_constr.enable
END
SCRIPT expose
BEGIN
main.vn_expose.enable
main.vn_offset.disable
END
SCRIPT offset
BEGIN
main.vn_expose.disable
main.vn_offset.enable
END
SCRIPT re_opts
BEGIN
program check_se_status
program disable_xtgee_common
main.ck_nocons.enable
main.tx_constr.enable
main.cb_constr.enable
main.ck_normal.enable
script max_ml_on
program main_normal_on
script rpt_lrtest_enable
script weights_setLayout_i
END
SCRIPT fe_opts
BEGIN
program check_se_status
program disable_xtgee_common
main.ck_nocons.disable
main.tx_constr.enable
main.cb_constr.enable
main.ck_normal.disable
script intopts_re_disable
script rpt_lrtest_enable
script max_ml_on
script weights_setLayout_i
END
SCRIPT pa_opts
BEGIN
program check_se_status
program enable_xtgee_common
main.ck_nocons.enable
main.tx_constr.disable
main.cb_constr.disable
main.ck_normal.disable
script intopts_re_disable
script rpt_lrtest_disable
script max_pa_on
script weights_setLayout_fpi
END
INCLUDE xtgee_common
INCLUDE byifin
INCLUDE weights
INCLUDE se
INCLUDE rpt_xt_irr
INCLUDE max_ml
SCRIPT PREINIT
BEGIN
script se_createAsGEE
END
PROGRAM check_se_status
BEGIN
if main.rb_pa {
call script se_setGEE_on
}
if !main.rb_pa {
call script se_setGEE_off
}
END
SCRIPT POSTINIT
BEGIN
program check_se_status
script corr_setForceVisible
script corr_setTabTitlePA
script weights_setLayout_i
END
PROGRAM command
BEGIN
allowxi
INCLUDE _by_pr
put "xtpoisson "
varlist main.vn_dv [main.vl_iv]
if !main.vl_iv & main.ck_nocons & !D(main.ck_nocons) {
stopbox stop `""Suppress constant term" is selected without independent variables."'
}
if main.rb_fe & !main.vl_iv {
stopbox stop `""Independent variables" must be filled in with "Fixed-effects" model"'
}
INCLUDE _weights_pr
INCLUDE _ifin_pr
beginoptions
option main.ck_nocons
option radio(main rb_re rb_fe rb_pa)
optionarg main.vn_expose
optionarg main.vn_offset
option main.ck_normal
put " " /program intopts_re_output
INCLUDE _constraints_main_pr
put " " /program xtgee_common_output
put " " /program se_output
put " " /program rpt_output
put " " /program max_output
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -