📄 svy_subpop_model.idlg
字号:
/*
svy_subpop_model.idlg -- include tab for survey
(subpop, if, and in options)
*! VERSION 1.0.2 27mar2005
*/
DEFINE fromwd 100
DEFINE fromsep +105
DEFINE towd 15
DEFINE tosep +25
DIALOG subpop, label("") tabtitle("if/in")
BEGIN
GROUPBOX gb_subpop _lft _top _iwd _ht9, ///
label("Subpopulation estimation")
TEXT tx_subpop _ilft _ss _vnwd ., ///
label("Indicator variable:")
VARNAME vn_subpop @ _ss @ ., ///
label("Indicator variable")
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 ifin_on) ///
onclickoff(script 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 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 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_opts_pr
BEGIN
put subpop.vn_subpop " "
if subpop.ex_subif {
put "if " subpop.ex_subif " "
}
END
PROGRAM svy_subpop_output
BEGIN
if subpop.ex_subif | subpop.vn_subpop {
put "subpop("
put /program subpop_opts_pr
put ") "
}
END
PROGRAM ifin_output
BEGIN
ifexp subpop.ex_if
if subpop.ck_in {
inrange subpop.sp_from subpop.sp_to
}
END
// END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -