📄 egen.dlg
字号:
SCRIPT tag
BEGIN
script expression_off
script varlist_on
script varname_off
script twovars_off
script numlist_off
program enable_byifin_no_by
script typeall_off
script typenum_off
script typestr_off
script typebyte_on
script typedoub_off
main.gb_opt.show
script opt_anyvalue_off
script opt_concat_off
script opt_cut_off
script opt_ends_off
script opt_group_off
script opt_mode_off
script opt_pc_off
script opt_pctile_off
script opt_rank_off
/*rownonmiss*/ main.ck_strok.hide
script opt_seq_off
script opt_std_off
/*tag*/ main.ck_missing.show
END
PROGRAM enable_byifin_no_by
BEGIN
call script byifin_disable_by
call script byifin_enable_if
call script byifin_enable_in
END
SCRIPT typeall_on
BEGIN
main.cb_typeall.show
END
SCRIPT typeall_off
BEGIN
main.cb_typeall.hide
END
SCRIPT typenum_on
BEGIN
main.cb_typenum.show
END
SCRIPT typenum_off
BEGIN
main.cb_typenum.hide
END
SCRIPT typestr_on
BEGIN
main.tx_typestr.show
END
SCRIPT typestr_off
BEGIN
main.tx_typestr.hide
END
SCRIPT typebyte_on
BEGIN
main.tx_typebyte.show
END
SCRIPT typebyte_off
BEGIN
main.tx_typebyte.hide
END
SCRIPT typedoub_on
BEGIN
main.tx_typedoub.show
END
SCRIPT typedoub_off
BEGIN
main.tx_typedoub.hide
END
SCRIPT expression_on
BEGIN
main.tx_expression.show
main.ex_expression.show
END
SCRIPT expression_off
BEGIN
main.tx_expression.hide
main.ex_expression.hide
END
SCRIPT varlist_on
BEGIN
main.tx_varlist.show
main.vl_varlist.show
END
SCRIPT varlist_off
BEGIN
main.tx_varlist.hide
main.vl_varlist.hide
END
SCRIPT varname_on
BEGIN
main.tx_varname.show
main.vn_varname.show
END
SCRIPT varname_off
BEGIN
main.tx_varname.hide
main.vn_varname.hide
END
SCRIPT twovars_on
BEGIN
main.tx_yearvar.show
main.vn_yearvar.show
main.tx_incomevar.show
main.vn_incomevar.show
END
SCRIPT twovars_off
BEGIN
main.tx_yearvar.hide
main.vn_yearvar.hide
main.tx_incomevar.hide
main.vn_incomevar.hide
END
SCRIPT numlist_on
BEGIN
main.tx_numlist.show
main.ed_numlist.show
END
SCRIPT numlist_off
BEGIN
main.tx_numlist.hide
main.ed_numlist.hide
END
PROGRAM by_on
BEGIN
script byifin_enable
END
SCRIPT by_off
BEGIN
script byifin_disable_by
END
SCRIPT opt_anyvalue_on
BEGIN
main.tx_values.show
main.ed_values.show
END
SCRIPT opt_anyvalue_off
BEGIN
main.tx_values.hide
main.ed_values.hide
END
SCRIPT opt_concat_on
BEGIN
main.gb_format.show
main.rb_asisformat.show
main.rb_format.show
main.ed_format.show
main.bn_format.show
main.rb_decode.show
main.tx_punct.show
main.tx_punct2.show
main.ed_punct.show
main.ck_maxlength.show
main.sp_maxlength.show
main.tx_maxlength.show
main.tx_maxlength2.show
END
SCRIPT opt_concat_off
BEGIN
main.gb_format.hide
main.rb_asisformat.hide
main.rb_format.hide
main.ed_format.hide
main.bn_format.hide
main.rb_decode.hide
main.tx_punct.hide
main.tx_punct2.hide
main.ed_punct.hide
main.ck_maxlength.hide
main.sp_maxlength.hide
main.tx_maxlength.hide
main.tx_maxlength2.hide
END
SCRIPT asis_on
BEGIN
main.ed_format.disable
main.bn_format.disable
script decodeOFF
END
SCRIPT format_on
BEGIN
main.ed_format.enable
main.bn_format.enable
script decodeOFF
END
SCRIPT decode_on
BEGIN
main.ed_format.disable
main.bn_format.disable
program decodeON
END
PROGRAM decodeON
BEGIN
call gaction main.ck_maxlength.enable
if main.ck_maxlength {
call gaction main.sp_maxlength.enable
}
if !main.ck_maxlength {
call gaction main.sp_maxlength.disable
}
call gaction main.tx_maxlength.enable
call gaction main.tx_maxlength2.enable
END
SCRIPT decodeOFF
BEGIN
main.ck_maxlength.disable
main.sp_maxlength.disable
main.tx_maxlength.disable
main.tx_maxlength2.disable
END
SCRIPT opt_cut_on
BEGIN
main.gb_cut.show
main.rb_at.show
main.ed_at.show
main.rb_group.show
main.sp_group.show
main.tx_group.show
main.ck_icodes.show
main.tx_icodes.show
main.ck_cut_label.show
main.tx_cut_label.show
END
SCRIPT opt_cut_off
BEGIN
main.gb_cut.hide
main.rb_at.hide
main.ed_at.hide
main.rb_group.hide
main.sp_group.hide
main.tx_group.hide
main.ck_icodes.hide
main.tx_icodes.hide
main.ck_cut_label.hide
main.tx_cut_label.hide
END
SCRIPT cut_at_on
BEGIN
main.ed_at.enable
main.sp_group.disable
END
SCRIPT cut_group_on
BEGIN
main.ed_at.disable
main.sp_group.enable
END
SCRIPT opt_ends_on
BEGIN
main.gb_ends.show
main.rb_head.show
main.rb_tail.show
main.rb_last.show
main.ck_trim.show
main.tx_ends_punct.show
main.ed_ends_punct.show
END
SCRIPT opt_ends_off
BEGIN
main.gb_ends.hide
main.rb_head.hide
main.rb_tail.hide
main.rb_last.hide
main.ck_trim.hide
main.tx_ends_punct.hide
main.ed_ends_punct.hide
END
SCRIPT opt_group_on
BEGIN
main.ck_gr_missing.show
main.ck_label.show
main.tx_lname.show
main.ed_lname.show
main.ck_truncate.show
main.sp_truncate.show
main.tx_truncate.show
END
SCRIPT opt_group_off
BEGIN
main.ck_gr_missing.hide
main.ck_label.hide
main.tx_lname.hide
main.ed_lname.hide
main.ck_truncate.hide
main.sp_truncate.hide
main.tx_truncate.hide
END
PROGRAM grouplabel_on
BEGIN
call gaction main.tx_lname.enable
call gaction main.ed_lname.enable
call gaction main.ck_truncate.enable
if main.ck_truncate {
call gaction main.sp_truncate.enable
}
if !main.ck_truncate {
call gaction main.sp_truncate.disable
}
call gaction main.tx_truncate.enable
END
SCRIPT grouplabel_off
BEGIN
main.tx_lname.disable
main.ed_lname.disable
main.ck_truncate.disable
main.sp_truncate.disable
main.tx_truncate.disable
END
SCRIPT opt_mode_on
BEGIN
main.gb_modes.show
main.rb_defaultmode.show
main.rb_minmode.show
main.rb_maxmode.show
main.rb_nummode.show
main.sp_nummode.show
main.tx_nummode.show
main.ck_mode_miss.show
main.tx_mode_miss.show
END
SCRIPT opt_mode_off
BEGIN
main.gb_modes.hide
main.rb_defaultmode.hide
main.rb_minmode.hide
main.rb_maxmode.hide
main.rb_nummode.hide
main.sp_nummode.hide
main.tx_nummode.hide
main.ck_mode_miss.hide
main.tx_mode_miss.hide
END
SCRIPT opt_pc_on
BEGIN
main.rb_percent.show
main.rb_prop.show
END
SCRIPT opt_pc_off
BEGIN
main.rb_percent.hide
main.rb_prop.hide
END
SCRIPT opt_pctile_on
BEGIN
main.sp_pctile_p.show
main.tx_pctile_p.show
END
SCRIPT opt_pctile_off
BEGIN
main.sp_pctile_p.hide
main.tx_pctile_p.hide
END
SCRIPT opt_rank_on
BEGIN
main.rb_average.show
main.rb_field.show
main.rb_track.show
main.rb_unique.show
END
SCRIPT opt_rank_off
BEGIN
main.rb_average.hide
main.rb_field.hide
main.rb_track.hide
main.rb_unique.hide
END
SCRIPT opt_seq_on
BEGIN
main.rb_seqdef.show
main.rb_seq.show
main.tx_seq_from.show
main.sp_seq_from.show
main.tx_seq_to.show
main.sp_seq_to.show
main.tx_seq_block.show
main.sp_seq_block.show
END
SCRIPT opt_seq_off
BEGIN
main.rb_seqdef.hide
main.rb_seq.hide
main.tx_seq_from.hide
main.sp_seq_from.hide
main.tx_seq_to.hide
main.sp_seq_to.hide
main.tx_seq_block.hide
main.sp_seq_block.hide
END
SCRIPT sequence_on
BEGIN
main.sp_seq_from.enable
main.sp_seq_to.enable
main.sp_seq_block.enable
END
SCRIPT sequence_off
BEGIN
main.sp_seq_from.disable
main.sp_seq_to.disable
main.sp_seq_block.disable
END
SCRIPT opt_std_on
BEGIN
main.gb_std.show
main.en_mean.show
main.tx_mean.show
main.en_std.show
main.tx_std.show
END
SCRIPT opt_std_off
BEGIN
main.gb_std.hide
main.en_mean.hide
main.tx_mean.hide
main.en_std.hide
main.tx_std.hide
END
PROGRAM egen_function_output
BEGIN
if main.lb_fcn.equals("mtr") {
require main.vn_yearvar main.vn_incomevar
put main.vn_yearvar " " main.vn_incomevar
}
if ! main.lb_fcn.equals("mtr") {
/* one (and only one) of these will have something in it */
put main.ex_expression
put main.vl_varlist
put main.vn_varname
put main.ed_numlist
}
END
PROGRAM command
BEGIN
/* "by ... :" */
INCLUDE _by_pr
/* "egen [type] var" */
require main.ed_var
put "egen "
if !H(main.cb_typeall) {
put main.cb_typeall
}
if !H(main.cb_typenum) {
put main.cb_typenum
}
if !H(main.tx_typebyte) {
put "byte "
}
/* --- do not need to put out anything for these cases ---
if !H(main.tx_typestr) | !H(main.tx_typedoub) {
put " "
}
*/
put " "
put main.ed_var
/* error checking */
/* if not all hidden ... (being checked because seq() takes no args */
if !(H(main.ex_expression) & H(main.vl_varlist) & H(main.vn_varname) /*
*/ & H(main.ed_numlist) & H(main.vn_yearvar) & /*
*/ H(main.vn_incomevar)) {
/* and if all are empty ... */
if main.lb_fcn.equals("mtr") {
if !(main.vn_yearvar | main.vn_incomevar) {
stopbox stop `""Egen function argument""' /*
*/ "must be filled in"
}
}
if ! main.lb_fcn.equals("mtr") {
if ((! H(main.ex_expression) & ! main.ex_expression) /*
*/ | (! H(main.vl_varlist) & ! main.vl_varlist) /*
*/ | (! H(main.vn_varname) & ! main.vn_varname) /*
*/ | (! H(main.ed_numlist) & ! main.ed_numlist)) /*
*/ {
stopbox stop `""Egen function argument""' /*
*/ "must be filled in"
}
}
}
/* " = fcn(...)" */
put " " "=" " " main.lb_fcn "("
put /program egen_function_output
put ")"
/* "[if exp] [in range]" */
INCLUDE _ifin_pr
/* ", <opts>" */
beginoptions
/* anyvalue */
if !H(main.ed_values) {
require main.ed_values
optionarg main.ed_values
}
/* concat */
optionarg main.ed_punct
if main.rb_format {
require main.ed_format
optionarg /quoted main.ed_format
}
if main.rb_decode {
option main.rb_decode
if main.ck_maxlength {
optionarg main.sp_maxlength
}
}
/* cut */
if main.rb_at {
require main.ed_at
optionarg main.ed_at
}
if main.rb_group {
optionarg main.sp_group
}
option main.ck_icodes
option main.ck_cut_label
/* ends */
option main.rb_head
option main.rb_tail
option main.rb_last
optionarg main.ed_ends_punct
option main.ck_trim
/* group */
option main.ck_gr_missing
option main.ck_label
optionarg main.ed_lname
if main.ck_label & main.ck_truncate {
optionarg main.sp_truncate
}
/* mode */
option main.rb_minmode
option main.rb_maxmode
if main.rb_nummode {
optionarg main.sp_nummode
}
option main.ck_mode_miss
/* pc */
option main.rb_prop
/* pctile */
optionarg main.sp_pctile_p
/* rank */
option main.rb_field
option main.rb_track
option main.rb_unique
/* rownonmiss */
option main.ck_strok
/* seq */
if main.rb_seq {
optionarg main.sp_seq_from
optionarg main.sp_seq_to
optionarg main.sp_seq_block
}
/* std */
optionarg main.en_mean
optionarg main.en_std
/* tag */
option main.ck_missing
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -