📄 svy_subpop.idlg
字号:
/*
svy_subpop.idlg -- include tab for survey
(over, subpop, if, and in options)
*! VERSION 1.1.2 13feb2005
*/
DEFINE fromwd 100
DEFINE fromsep +105
DEFINE towd 15
DEFINE tosep +25
DIALOG subpop, label("") tabtitle("if/in/over")
BEGIN
GROUPBOX gb_subpop _lft _top _iwd _ht12, ///
label("Subpopulation estimation")
TEXT tx_overopt _ilft _ss _ivlwd ., ///
label("Variables identifying multiple subpopulations:")
DEFINE y @y
VARLIST vl_overopt @ _ss _comb3_1 ., ///
label("Variables identifying multiple subpopulations") ///
option(over)
TEXT tx_subpop _ilft3_3 y _cwd3_2 ., ///
label("Indicator variable:")
VARNAME vn_subpop @ _ss _cwd3_2 ., ///
label("Indicator variable")
CHECKBOX ck_nolab _ilft _ms _cwd2 ., ///
label("Suppress multi. subpop. labels") ///
option(nolabel)
TEXT tx_subif _ilft _ls _ibwd ., ///
label("If: (expression)")
EXP ex_subif @ _ss _ibwd ., ///
label("Create...")
CHECKBOX ck_ifin _lft _xxls _iwd _ht7h, ///
label("Restrict to observations") ///
groupbox ///
onclickon(program svy_ifin_on) ///
onclickoff(script svy_ifin_off)
TEXT tx_if _ilft _ss _ibwd ., ///
label("If: (expression)")
EXP ex_if @ _ss _ibwd ., ///
label("Create...")
CHECKBOX ck_in _ilft _ls fromwd ., ///
label("Obs. in range:") ///
onclickon(script svy_in_on) ///
onclickoff(script svy_in_off)
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
SCRIPT subpop_in_on
BEGIN
subpop.sp_subfrom.enable
subpop.sp_subto.enable
END
SCRIPT subpop_in_off
BEGIN
subpop.sp_subfrom.disable
subpop.sp_subto.disable
END
PROGRAM svy_ifin_on
BEGIN
call subpop.tx_if.enable
call subpop.ex_if.enable
call subpop.ck_in.enable
if subpop.ck_in {
call script svy_in_on
}
call subpop.tx_to.enable
END
SCRIPT svy_ifin_off
BEGIN
subpop.tx_if.disable
subpop.ex_if.disable
subpop.ck_in.disable
script svy_in_off
subpop.tx_to.disable
END
SCRIPT svy_in_on
BEGIN
subpop.sp_from.enable
subpop.tx_to.enable
subpop.sp_to.enable
END
SCRIPT svy_in_off
BEGIN
subpop.sp_from.disable
subpop.sp_to.disable
END
PROGRAM subpop_args_output
BEGIN
put subpop.vn_subpop " "
if subpop.ex_subif {
put "if " subpop.ex_subif " "
}
END
PROGRAM svy_subpop_output
BEGIN
if subpop.vn_subpop | subpop.ex_subif {
put "subpop("
put /program subpop_args_output
put ") "
}
END
PROGRAM over_output
BEGIN
if !subpop.ck_nolab {
optionarg subpop.vl_overopt
}
if subpop.ck_nolab {
require subpop.vl_overopt
put "over(" subpop.vl_overopt ", nolabel)"
}
END
PROGRAM ifin_output
BEGIN
ifexp subpop.ex_if
if subpop.ck_in {
inrange subpop.sp_from subpop.sp_to
}
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -