📄 asmprobit.dlg
字号:
/*
asmprobit
*! VERSION 1.0.4 16may2005
keyword: eclass
*/
VERSION 9.0
INCLUDE _std_glm
INCLUDE header
HELP hlp1, view("help asmprobit")
RESET res1
DIALOG main, tabtitle("Model") ///
label("asmprobit - Alternative-specific multinomial probit regression")
BEGIN
INCLUDE _dviv
TEXT tx_case _lft _ls _vnwd ., ///
label("Case variable:")
DEFINE holdy @y
VARNAME vn_case @ _ss @ ., ///
label("Case variable") option(case)
TEXT tx_casevars _vlx holdy _vlwd ., ///
label("Case-specific variables: (optional)")
VARLIST vl_casevars @ _ss _vlwd ., ///
label("Case-specific variables") option(casevars) ///
allowcat
TEXT tx_alternatives _lft _ls _iwd ., ///
label("Alternatives variable:")
VARNAME vn_alternatives @ _ss _vnwd ., ///
label("Alternatives variable") ///
option(alternatives)
TEXT tx_constr _lft _ls _iwd ., ///
label("Constraints: (optional)")
COMBOBOX cb_constr @ _ss @ ., ///
append ///
dropdown ///
contents(constraint) ///
label("Constraints") ///
option(constraints)
END
DIALOG model2, tabtitle("Model 2")
BEGIN
GROUPBOX gb_corr _lft _top _iwd _ht8, ///
label("Correlation structure of the latent-variable errors")
RADIO rb_unstructured _indent _ss _cwd3_1 ., ///
label("Unstructured (default)") first option(NONE) ///
onclickon(program check_notransform)
DEFINE holdy @y
RADIO rb_exchangeable @ _ss @ ., ///
label("Exchangeable") ///
option(correlation(exchangeable)) ///
onclickon(program check_notransform)
RADIO rb_independent @ _ss @ ., ///
label("Independent") ///
option(correlation(independent)) ///
onclickon(program check_notransform)
RADIO rb_cpattern _lft3_02 holdy _comb3_1 ., ///
label("Specify matrix for correlation pattern") ///
onclickon(script cpattern_on) ///
onclickoff(script cpattern_off) ///
option(NONE)
COMBOBOX cb_cpattern 220 _ss _vnwd ., ///
label("Matrix") dropdown contents(matrix)
TEXT tx_cpattern _vnsep @ 150 ., ///
label("Matrix")
RADIO rb_cfixed _lft3_02 _ss _comb3_1 ., ///
onclickon(script cfixed_on) ///
onclickoff(script cfixed_off) ///
last option(NONE) ///
label("Specify matrix for fixed and free correlation parameters")
COMBOBOX cb_cfixed 220 _ss _vnwd ., ///
label("Matrix") dropdown contents(matrix)
TEXT tx_cfixed _vnsep @ 150 ., ///
label("Matrix")
GROUPBOX gb_stddev _lft _xls _iwd _ht8, ///
label("Variance structure of the latent-variable errors")
RADIO rb_heteroske _indent _ss _cwd3_1 ., ///
label("Heteroskedastic (default)") first option(NONE) ///
onclickon(program check_notransform)
DEFINE holdy @y
RADIO rb_homoske @ _ss @ ., ///
label("Homoskedastic") option(stddev(homoskedastic)) ///
onclickon(program check_notransform)
RADIO rb_vpattern _lft3_02 holdy _comb3_1 ., ///
label("Specify matrix for standard deviation pattern") ///
onclickon(script vpattern_on) ///
onclickoff(script vpattern_off) ///
option(NONE)
COMBOBOX cb_vpattern 220 _ss _vnwd ., ///
label("Matrix") dropdown contents(matrix)
TEXT tx_vpattern _vnsep @ 150 ., ///
label("Matrix")
RADIO rb_vfixed _lft3_02 _ss _comb3_1 ., ///
onclickon(script vfixed_on) ///
onclickoff(script vfixed_off) ///
last option(NONE) ///
label("Specify matrix for fixed and free standard deviation parameters")
COMBOBOX cb_vfixed 220 _ss _vnwd ., ///
label("Matrix") dropdown contents(matrix)
TEXT tx_vfixed _vnsep @ 150 ., ///
label("Matrix")
CHECKBOX ck_noconstant _lft +45 _iwd ., ///
option(noconstant) label("Suppress alternative-specific constant terms")
CHECKBOX ck_basealt _lft _ms _cwd1 ., ///
onclickon(script basealt_on) ///
onclickoff(script basealt_off) ///
label("Specify alternative to normalize location")
DEFINE holdy @y
EDIT en_basealt _indent2 _ss _en14wd ., ///
label("Base alternative")
TEXT tx_basealt _en14sep @ 120 ., ///
label("Base alternative")
CHECKBOX ck_scalealt _lft2 holdy _cwd1 ., ///
onclickon(script scalealt_on) ///
onclickoff(script scalealt_off) ///
label("Specify alternative to normalize scale")
EDIT en_scalealt _indent2 _ss _en14wd ., ///
label("Scale alternative")
TEXT tx_scalealt _en14sep @ 120 ., ///
label("Scale alternative")
END
PROGRAM check_notransform
BEGIN
if model2.rb_unstructured | model2.rb_heteroske {
call rpt.ck_notransform.enable
call rpt.tx_notransform.enable
}
if !model2.rb_unstructured | ! model2.rb_heteroske {
call rpt.ck_notransform.disable
call rpt.tx_notransform.disable
}
END
SCRIPT basealt_on
BEGIN
model2.en_basealt.enable
model2.tx_basealt.enable
END
SCRIPT basealt_off
BEGIN
model2.en_basealt.disable
model2.tx_basealt.disable
END
SCRIPT scalealt_on
BEGIN
model2.en_scalealt.enable
model2.tx_scalealt.enable
END
SCRIPT scalealt_off
BEGIN
model2.en_scalealt.disable
model2.tx_scalealt.disable
END
SCRIPT cpattern_on
BEGIN
model2.cb_cpattern.enable
model2.tx_cpattern.enable
program check_notransform
END
SCRIPT cpattern_off
BEGIN
model2.cb_cpattern.disable
model2.tx_cpattern.disable
program check_notransform
END
SCRIPT cfixed_on
BEGIN
model2.cb_cfixed.enable
model2.tx_cfixed.enable
program check_notransform
END
SCRIPT cfixed_off
BEGIN
model2.cb_cfixed.disable
model2.tx_cfixed.disable
program check_notransform
END
SCRIPT vpattern_on
BEGIN
model2.cb_vpattern.enable
model2.tx_vpattern.enable
program check_notransform
END
SCRIPT vpattern_off
BEGIN
model2.cb_vpattern.disable
model2.tx_vpattern.disable
program check_notransform
END
SCRIPT vfixed_on
BEGIN
model2.cb_vfixed.enable
model2.tx_vfixed.enable
program check_notransform
END
SCRIPT vfixed_off
BEGIN
model2.cb_vfixed.disable
model2.tx_vfixed.disable
program check_notransform
END
INCLUDE byifin
INCLUDE weights_fpi
INCLUDE se
SCRIPT PREINIT
BEGIN
script se_createAsJknifeBstrapML
END
DIALOG rpt, tabtitle("Reporting")
BEGIN
DEFINE _x _lft
DEFINE _cx _spr2b
DEFINE _y _top
INCLUDE _sp_level
CHECKBOX ck_notransform _lft _ls _iwd ., ///
option(notransform) ///
label("Prevent reparameterizing the Cholesky factored variance-covariance estimates to the standard")
TEXT tx_notransform _indent2 _vss _inwd ., ///
label("deviation and correlation metric")
END
DIALOG int, tabtitle("Int options")
BEGIN
GROUPBOX gb_int _lft _top _iwd _ht22h, ///
label("Integration options for simulating likelihood")
GROUPBOX gb_method _ilft _ms _cwd1 _ht6, ///
label("Type of quasi- or pseudo-uniform sequence")
RADIO rb_hammersley _indent _ss _inwd ., ///
label("Hammersley sequence") first option(NONE) ///
onclickon(script int_random_off)
RADIO rb_halton @ _ss @ ., ///
label("Halton sequence") ///
option(intmethod(halton)) onclickon(script int_random_off)
RADIO rb_random @ _ss @ ., ///
label("Uniform pseudo-random sequence") last ///
option(intmethod(random)) onclickon(script int_random_on)
CHECKBOX ck_intpoints _ilft _xls _ibwd ., ///
onclickon(script int_intpoints_on) ///
onclickoff(script int_intpoints_off) ///
label("Override the default number of points used in quasi- or pseudo-uniform sequence")
EDIT ed_intpoints _indent2 _ss _en7wd ., ///
numonly option(intpoints) label("Points")
TEXT tx_intpoints _en7sep @ 100 ., ///
label("Points")
CHECKBOX ck_intburn _ilft _ls _ibwd ., ///
onclickon(script int_intburn_on) ///
onclickoff(script int_intburn_off) ///
label("Override the default burn-in index in the quasi-uniform sequence")
DEFINE y @y
EDIT ed_intburn _indent2 _ss _en7wd ., ///
numonly option(intburn) label("Index")
TEXT tx_intburn _en7sep @ 100 ., ///
label("Index")
CHECKBOX ck_intseed _ilft y _ibwd ., ///
onclickon(script int_intseed_on) ///
onclickoff(script int_intseed_off) ///
label("Set seed to use for generating the uniform sequence")
EDIT ed_intseed _indent2 _ss _en7wd ., ///
numonly option(intseed) label("Seed")
TEXT tx_intseed _en7sep @ 100 ., ///
label("Seed")
CHECKBOX ck_antithetics _ilft _ls _ibwd ., ///
option(antithetics) ///
label("Use antithetic draws")
GROUPBOX gb_additionalmax _lft _xls _iwd _ht4, ///
label("Additional maximization options")
CHECKBOX ck_initbhhh _ilft _ss _inwd ., ///
onclickon(script int_initbhhh_on) ///
onclickoff(script int_initbhhh_off) ///
label("Use the BHHH optimization algorithm for the first # iterations")
EDIT ed_initbhhh _indent2 _ss _en7wd ., ///
label("Iterations") option(initbhhh)
TEXT tx_initbhhh _en7sep @ 100 ., ///
label("Iterations")
END
SCRIPT int_random_off
BEGIN
int.ck_intburn.show
int.ed_intburn.show
int.tx_intburn.show
int.ck_intseed.hide
int.ed_intseed.hide
int.tx_intseed.hide
END
SCRIPT int_random_on
BEGIN
int.ck_intseed.show
int.ed_intseed.show
int.tx_intseed.show
int.ck_intburn.hide
int.ed_intburn.hide
int.tx_intburn.hide
END
SCRIPT int_intburn_on
BEGIN
int.ed_intburn.enable
int.tx_intburn.enable
END
SCRIPT int_intburn_off
BEGIN
int.ed_intburn.disable
int.tx_intburn.disable
END
SCRIPT int_intseed_on
BEGIN
int.ed_intseed.enable
int.tx_intseed.enable
END
SCRIPT int_intseed_off
BEGIN
int.ed_intseed.disable
int.tx_intseed.disable
END
SCRIPT int_intpoints_on
BEGIN
int.ed_intpoints.enable
int.tx_intpoints.enable
END
SCRIPT int_intpoints_off
BEGIN
int.ed_intpoints.disable
int.tx_intpoints.disable
END
SCRIPT int_initbhhh_on
BEGIN
int.ed_initbhhh.enable
int.tx_initbhhh.enable
END
SCRIPT int_initbhhh_off
BEGIN
int.ed_initbhhh.disable
int.tx_initbhhh.disable
END
INCLUDE max_ml
PROGRAM rpt_output
BEGIN
optionarg /hidedefault rpt.sp_level
option rpt.ck_notransform
END
PROGRAM int_output
BEGIN
option int.rb_halton
option int.rb_random
if int.ck_intpoints {
require int.ed_intpoints
optionarg int.ed_intpoints
}
if int.ck_intburn {
require int.ed_intburn
optionarg int.ed_intburn
}
if int.ck_intseed {
require int.ed_intseed
optionarg int.ed_intseed
}
option int.ck_antithetics
if int.ck_initbhhh {
require int.ed_initbhhh
optionarg int.ed_initbhhh
}
END
PROGRAM command
BEGIN
allowxi
INCLUDE _by_pr
put "asmprobit "
varlist main.vn_dv [main.vl_iv]
INCLUDE _weights_pr
INCLUDE _ifin_pr
beginoptions
require main.vn_case
optionarg main.vn_case
require main.vn_alternatives
optionarg main.vn_alternatives
optionarg main.vl_casevars
optionarg main.cb_constr
option model2.rb_exchangeable
option model2.rb_independent
if model2.rb_cpattern {
require model2.cb_cpattern
put "correlation(pattern "
put model2.cb_cpattern
put ") "
}
if model2.rb_cfixed {
require model2.cb_cfixed
put "correlation(fixed "
put model2.cb_cfixed
put ") "
}
option model2.rb_homoske
if model2.rb_vpattern {
require model2.cb_vpattern
put "stddev(pattern "
put model2.cb_vpattern
put ") "
}
if model2.rb_vfixed {
require model2.cb_vfixed
put "stddev(fixed "
put model2.cb_vfixed
put ") "
}
option model2.ck_noconstant
if model2.ck_basealt {
require model2.en_basealt
put "base("
put model2.en_basealt
put ") "
}
if model2.ck_scalealt {
require model2.en_scalealt
put "scale("
put model2.en_scalealt
put ") "
}
put " " /program se_output
put " " /program rpt_output
put " " /program int_output
put " " /program max_output
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -