📄 dstdize.dlg
字号:
/*
dstdize
*! VERSION 1.1.1 31mar2005
which dstdize - *! version 1.3.9 21sep2000
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht310
INCLUDE header
HELP hlp1, view("help dstdize")
RESET res1
DIALOG main, label("dstdize - Direct standardization") tabtitle("Main")
BEGIN
TEXT tx_char _lft _top _cwd1 ., /*
*/ label("Characteristic variable:")
VARNAME vn_char @ _ss _vnwd ., /*
*/ label("Characteristic variable")
TEXT tx_pop _lft2 _top _cwd1 ., /*
*/ label("Population variable:")
VARNAME vn_pop @ _ss _vnwd ., /*
*/ label("Population variable")
TEXT tx_strata _lft _ls _cwd1 ., /*
*/ label("Strata variables:")
DEFINE holdy @y
VARLIST vl_strata @ _ss @ ., /*
*/ label("Strata variables")
TEXT tx_byvars _lft2 holdy @ ., /*
*/ label("Grouping variables:")
VARLIST vl_byvars @ _ss @ ., /*
*/ option(by) /*
*/ label("Grouping variables")
RADIO rb_def _lft _xls _iwd ., /*
*/ first /*
*/ clickon("script default_on") /*
*/ label("Use standard population from data in memory")
RADIO rb_using @ _ms @ ., /*
*/ clickon("script using_on") /*
*/ label("Use standard population from Stata dataset:")
FILE fi_using _indent2 _ss _ibwd ., /*
*/ option(using) /*
*/ error("Use standard population from Stata dataset")/*
*/ filter("Stata Dataset (*.dta)|*.dta|All Files (*.*)|*.*") /*
*/ defext(dta) /*
*/ label("Browse...")
RADIO rb_base _lft _ls _iwd ., /*
*/ last /*
*/ clickon("script base_on") /*
*/ label("Use standard population from a value of grouping variable:")
TEXT tx_base _indent2 _ss _ibwd ., /*
*/ label("Value:")
DEFINE holdy @y
EDIT ed_base @ _ss _vnwd ., /*
*/ option(base) /*
*/ label("Value")
TEXT tx_byvar _lft2 holdy _cwd2 ., /*
*/ label("Grouping variable:")
VARNAME vn_byvar @ _ss _vnwd ., /*
*/ option(by) /*
*/ label("Grouping variable")
DEFINE _x _lft
DEFINE _cx _spr
DEFINE _y _xls
INCLUDE _sp_level
END
SCRIPT base_on
BEGIN
main.fi_using.disable
main.ed_base.enable
main.vn_byvar.enable
main.vl_byvars.disable
END
SCRIPT using_on
BEGIN
main.fi_using.enable
main.ed_base.disable
main.vn_byvar.disable
main.vl_byvars.enable
END
SCRIPT default_on
BEGIN
main.fi_using.disable
main.ed_base.disable
main.vn_byvar.disable
main.vl_byvars.enable
END
INCLUDE ifin
DIALOG opt, tabtitle("Options")
BEGIN
TEXT tx_saving _lft _top _iwd ., /*
*/ label("Save computed standard population distribution as a Stata dataset:")
FILE fi_saving @ _ss @ ., /*
*/ option(saving) /*
*/ label("Save As...") /*
*/ filter("Stata Dataset (*.dta)|*.dta|All Files (*.*)|*.*") /*
*/ defext(dta) /*
*/ save
TEXT tx_format @ _ls @ ., /*
*/ label("Final summary table display format:")
EDIT ed_format _indent2 _ss _en7wd ., /*
*/ option("format") /*
*/ default("%10.0g") /*
*/ label("Final summary table display format")
BUTTON bn_format _en7sep @ _cken7r2 ., /*
*/ label("Help format...") /*
*/ onpush(view help format##|_new)
CHECKBOX ck_print _lft _ls _iwd ., /*
*/ option(print) /*
*/ label("Include table summary of standard population in output")
GROUPBOX gb_adv @ _xls @ _ht3, /*
*/ label("Advanced")
CHECKBOX ck_nores _ilft _ms _inwd ., /*
*/ option(nores) /*
*/ label("Suppress saving results in r()")
END
PROGRAM command
BEGIN
put "dstdize "
varlist main.vn_char
varlist main.vn_pop
varlist main.vl_strata
INCLUDE _ifin_pr
beginoptions
if main.rb_def {
require main.vl_byvars
optionarg main.vl_byvars
}
if main.rb_using {
require main.vl_byvars
require main.fi_using
optionarg main.vl_byvars
optionarg /quoted main.fi_using
}
if main.rb_base {
require main.ed_base
require main.vn_byvar
optionarg main.ed_base
optionarg main.vn_byvar
}
if opt.fi_saving {
repfile opt.fi_saving
put " " "saving("
put `"""'
put opt.fi_saving
put `"""'
put ", replace)"
}
option opt.ck_print
optionarg /hidedefault opt.ed_format
INCLUDE _level_main_pr
option opt.ck_nores
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -