📄 egen.dlg
字号:
/*
egen
*! VERSION 1.1.1 31mar2005
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht340
INCLUDE header
HELP hlp1, view("help egen")
RESET res1
DIALOG main, label("egen - Extensions to generate") tabtitle("Main")
BEGIN
TEXT tx_var _lft _top _vnwd ., /*
*/ label("Generate variable:")
EDIT ed_var @ _ss @ ., /*
*/ label("Generate variable") max(32)
TEXT tx_type _lft3_2 _top _comb3_1 ., /*
*/ label("Generate variable as type:")
COMBOBOX cb_typeall @ _ss _vnwd ., /*
*/ dropdownlist /*
*/ label("Type") /*
*/ contents("typeall_words") value("typeall")
COMBOBOX cb_typenum @ @ @ ., /*
*/ dropdownlist /*
*/ label("Type") /*
*/ contents("typenum_words") value("typenum")
TEXT tx_typestr @ @ @ ., /*
*/ label("String")
TEXT tx_typebyte @ @ @ ., /*
*/ label("Byte")
TEXT tx_typedoub @ @ @ ., /*
*/ label("Double")
/*----------------------------------------------------------------------*/
TEXT tx_fcn _lft _ls 155 ., /*
*/ label("Egen function:")
DEFINE holdy @y
LISTBOX lb_fcn @ _ss @ _ht7, /*
*/ contents(func_words) /*
*/ value(functions) /*
*/ onselchangelist(func_change)
/*----------------------------------------------------------------------*/
/* Options go here */
GROUPBOX gb_opt @ _vs7 _iwd _ht11, /*
*/ label("Options")
/* anyvalue, anymatch, anycount */
TEXT tx_values @ _ss @ ., /*
*/ label("Integer number list: (required)")
DEFINE opty @y
EDIT ed_values @ _ss @ ., /*
*/ option(values) /*
*/ label("Integer number list")
/* concat */
GROUPBOX gb_format _ilft opty _cwd2 _ht7, /*
*/ label("Numeric variable format")
RADIO rb_asisformat _indent _ss _inwd ., first /*
*/ clickon("script asis_on") /*
*/ label("As is")
DEFINE tmpx @x
DEFINE tmpcx @cx
RADIO rb_format @ _ms _rbwd ., /*
*/ clickon("script format_on") /*
*/ label("")
EDIT ed_format _rbsep @ _en7wd ., /*
*/ option(format) /*
*/ default("%9.0g") /*
*/ label("Format")
BUTTON bn_format _en7sep @ 120 ., /*
*/ label("Help format...") /*
*/ onpush(view help format##|_new)
RADIO rb_decode tmpx _ms tmpcx ., last /*
*/ clickon("script decode_on") /*
*/ option("decode") /*
*/ label("Using decode")
TEXT tx_punct _lft2 opty _cwd2 ., /*
*/ label("Punctuation between variables:")
TEXT tx_punct2 @ _vss @ ., /*
*/ label("(default is nothing between variables)")
EDIT ed_punct @ _ss @ ., /*
*/ option(punct) /*
*/ label("Punctuation between variables")
CHECKBOX ck_maxlength @ _ls _ckwd ., /*
*/ clickon("gaction main.sp_maxlength.enable") /*
*/ clickoff("gaction main.sp_maxlength.disable") /*
*/ label("")
SPINNER sp_maxlength _cksep @ _spwd ., /*
*/ min(2) max(100) default(20) /*
*/ option(maxlength) /*
*/ label("Maximum label length")
TEXT tx_maxlength _spsep @ _ckspr2b ., /*
*/ label("Maximum label length")
TEXT tx_maxlength2 @ _vss @ ., /*
*/ label("(when using decode)")
/* cut */
GROUPBOX gb_cut _ilft opty _cwd2 _ht7, /*
*/ label("Form groups")
RADIO rb_at _indent _ss _inwd ., first /*
*/ clickon("script cut_at_on") /*
*/ label("Using the following break points:")
DEFINE cutx @x
EDIT ed_at _indent2 _ss _inwd ., /*
*/ option(at) /*
*/ label("Using the following break points")
RADIO rb_group cutx _ls _rbwd ., last /*
*/ clickon("script cut_group_on") /*
*/ label("")
SPINNER sp_group _rbsep @ _spwd ., /*
*/ min(2) max(100000000) default(2) /*
*/ option(group) /*
*/ label("Equal freq. groups")
TEXT tx_group _spsep @ _vnwd ., /*
*/ label("Equal freq. groups")
CHECKBOX ck_icodes _lft2 opty _cwd2 ., /*
*/ option(icodes) /*
*/ label("Use codes 0, 1, 2, ... instead")
TEXT tx_icodes _indent2 _vss _inwd ., /*
*/ label("of left-hand ends of intervals")
CHECKBOX ck_cut_label _lft2 _ls _cwd2 ., /*
*/ option(label) /*
*/ label("Label integer-coded values")
TEXT tx_cut_label _indent2 _vss _inwd ., /*
*/ label("with left-hand ends")
/* ends */
GROUPBOX gb_ends _ilft opty _cwd2 _ht6, /*
*/ label("Portion of string to extract")
RADIO rb_head _indent _ss _inwd ., first /*
*/ option(head) /*
*/ label(`"First "word""')
RADIO rb_tail @ _ss @ ., /*
*/ option(tail) /*
*/ label(`"All but first "word""')
RADIO rb_last @ _ss @ ., last /*
*/ option(last) /*
*/ label(`"Last "word""')
TEXT tx_ends_punct _lft2 opty _cwd2 ., /*
*/ label(`""word" delimiter: (default is space)"')
EDIT ed_ends_punct @ _ss _en14wd ., /*
*/ option(punct) /*
*/ label(`""word" delimiter"')
CHECKBOX ck_trim @ _ls _cwd2 ., /*
*/ option(trim) /*
*/ label("Trim leading and trailing spaces")
/* group */
CHECKBOX ck_gr_missing _ilft opty _ibwd ., /*
*/ option(missing) /*
*/ label("Use missing values in determining groups")
CHECKBOX ck_label @ _ms @ _ht5h, /*
*/ groupbox /*
*/ clickon("program grouplabel_on") /*
*/ clickoff("script grouplabel_off") /*
*/ option(label) /*
*/ label("Create labels and assign group numbers based on sorted data")
EDIT ed_lname _indent2 _ms _vnwd ., /*
*/ option(lname) max(32) /*
*/ label("Name for storing value label")
DEFINE xlnm @x
TEXT tx_lname _vnsep @ _vnr4c ., /*
*/ label("Name for storing value label")
CHECKBOX ck_truncate xlnm _ls _ckwd ., /*
*/ clickon("gaction main.sp_truncate.enable") /*
*/ clickoff("gaction main.sp_truncate.disable") /*
*/ label("")
SPINNER sp_truncate _cksep @ _spwd ., /*
*/ min(1) max(100) default(10) /*
*/ option(truncate) /*
*/ label("Maximum label length contribution for each variable")
TEXT tx_truncate _spsep @ _comb4_2 ., /*
*/ label("Maximum label length contribution for each variable")
/* mode */
GROUPBOX gb_modes _ilft opty _cwd2 _ht8, /*
*/ label("With multiple modes produce")
RADIO rb_defaultmode _indent _ss _inwd ., first /*
*/ option(NONE) /*
*/ clickon(script mode_missing_sel) /*
*/ label("Missing values")
RADIO rb_minmode @ _ss @ ., /*
*/ option(minmode) /*
*/ clickon(script mode_value_sel) /*
*/ label("Minimum mode value")
RADIO rb_maxmode @ _ss @ ., /*
*/ option(maxmode) /*
*/ clickon(script mode_value_sel) /*
*/ label("Maximum mode value")
RADIO rb_nummode @ _ss _rbwd ., last /*
*/ option(NONE) /*
*/ clickon(script mode_nummode_sel) /*
*/ label("")
SPINNER sp_nummode _rbsep @ _spwd ., /*
*/ min(1) max(100) default(1) /*
*/ option(nummode) /*
*/ label("Mode value")
TEXT tx_nummode _spsep @ _vnwd ., /*
*/ label("Mode value")
CHECKBOX ck_mode_miss _lft2 opty _cwd2 ., /*
*/ option(missing) /*
*/ label("Include missing values")
TEXT tx_mode_miss _indent2 _vss _inwd ., /*
*/ label("when determining the mode")
/* pc */
RADIO rb_percent _ilft opty _ibwd ., first /*
*/ option(NONE) /*
*/ label("Percent of total (0 to 100)")
RADIO rb_prop @ _ss @ ., last /*
*/ option(prop) /*
*/ label("Proportion of total (0 to 1)")
/* pctile */
SPINNER sp_pctile_p _ilft opty _spwd ., /*
*/ min(1) max(99) default(50) /*
*/ option(p) /*
*/ label("Percentile")
TEXT tx_pctile_p _spsep @ _sprb ., /*
*/ label("Percentile")
/* rank */
RADIO rb_average _ilft opty _ibwd ., first /*
*/ option(NONE) /*
*/label("Lowest is ranked 1 and ties are assigned average rank")
RADIO rb_field @ _ss @ ., /*
*/ option(field) /*
*/ label("Highest is ranked 1 and ties are assigned best rank")
RADIO rb_track @ _ss @ ., /*
*/ option(track) /*
*/ label("Lowest is ranked 1 and ties are assigned best rank")
RADIO rb_unique @ _ss @ ., last /*
*/ option(unique) /*
*/ label("Lowest is ranked 1 and ties are assigned unique rank")
/* rownonmiss */
CHECKBOX ck_strok _ilft opty _ibwd ., /*
*/ option(strok) /*
*/ label("Allow string variables")
/* seq */
RADIO rb_seqdef _ilft opty _ibwd ., first /*
*/ clickon("script sequence_off") /*
*/ label("Sequence from 1 to maximum number of values")
RADIO rb_seq @ _ss @ ., last /*
*/ clickon("script sequence_on") /*
*/ label("Sequence:")
TEXT tx_seq_from _ilft _ss _cwd4_2 ., right /*
*/ label("From:")
SPINNER sp_seq_from _lft4_2 @ _spwd ., /*
*/ min(-10000000) max(100000000) default(1) /*
*/ option(from) /*
*/ label("From")
TEXT tx_seq_to _ilft _ms _cwd4_2 ., right /*
*/ label("To:")
SPINNER sp_seq_to _lft4_2 @ _spwd ., /*
*/ min(-10000000) max(100000000) default(c(N)) /*
*/ option(to) /*
*/ label("To")
TEXT tx_seq_block _ilft _ms _cwd4_2 ., right /*
*/ label("In blocks of:")
SPINNER sp_seq_block _lft4_2 @ _spwd ., /*
*/ min(1) max(100000000) default(1) /*
*/ option(block) /*
*/ label("In blocks of")
/* std */
GROUPBOX gb_std _ilft opty _ibwd _ht5, /*
*/ label("Produce a variable with")
EDIT en_mean _indent _ss _en7wd ., numonly /*
*/ default(0) /*
*/ option(mean) /*
*/ label("Mean")
DEFINE xstd @x
TEXT tx_mean _en7sep @ _en7r4c ., /*
*/ label("Mean")
EDIT en_std xstd _ls _en7wd ., numonly /*
*/ default(1) /*
*/ option(std) /*
*/ label("Standard deviation")
TEXT tx_std _en7sep @ _en7r4c ., /*
*/ label("Standard deviation")
/* tag */
CHECKBOX ck_missing _ilft opty _ibwd ., /*
*/ option(missing) /*
*/ label("Missing values of the variable list may be included")
/*----------------------------------------------------------------------*/
/* Function argument goes here */
GROUPBOX gb_argument _lft3_2 holdy _comb3_1 _ht9, /*
*/ label("Egen function argument")
/* Expression */
TEXT tx_expression _indent _ss _inwd ., /*
*/ label("Expression:")
DEFINE holdy2 @y
DEFINE holdcx @cx
EXP ex_expression @ _ss _comb3_3 ., /*
*/ label("Create...") /*
*/
/* Varlist */
TEXT tx_varlist @ holdy2 holdcx ., /*
*/ label("Variables:")
VARLIST vl_varlist @ _ss @ ., /*
*/ label("Variables")
/* Varname */
TEXT tx_varname @ holdy2 holdcx ., /*
*/ label("Variable:")
VARNAME vn_varname @ _ss _vnwd ., /*
*/ label("Variable")
/* 2 Varnames */
TEXT tx_yearvar @ holdy2 holdcx ., /*
*/ label("Year variable or constant:")
VARNAME vn_yearvar @ _ss _vnwd ., /*
*/ label("Year variable or constant")
TEXT tx_incomevar @ _ms holdcx ., /*
*/ label("Income variable or constant:")
VARNAME vn_incomevar @ _ss _vnwd ., /*
*/ label("Income variable or constant")
/* Numlist */
TEXT tx_numlist @ holdy2 holdcx ., /*
*/ label("Number list that provides the pattern:")
EDIT ed_numlist @ _ss @ ., /*
*/ label("Number list that provides the pattern")
END
SCRIPT mode_missing_sel
BEGIN
main.sp_nummode.disable
main.ck_mode_miss.disable
main.tx_mode_miss.disable
END
SCRIPT mode_value_sel
BEGIN
main.sp_nummode.disable
main.ck_mode_miss.enable
main.tx_mode_miss.enable
END
SCRIPT mode_nummode_sel
BEGIN
main.sp_nummode.enable
main.ck_mode_miss.enable
main.tx_mode_miss.enable
END
INCLUDE byifin
LIST typeall
BEGIN
float
double
long
int
byte
str
END
LIST typeall_words
BEGIN
Float
Double
Long integer
Integer
Byte
String
END
LIST typenum
BEGIN
float
double
long
int
byte
END
LIST typenum_words
BEGIN
Float
Double
Long integer
Integer
Byte
END
LIST functions
BEGIN
anycount
anymatch
anyvalue
concat
count
cut
diff
ends
fill
group
iqr
kurt
mad
max
mdev
mean
median
min
mode
mtr
pc
pctile
rank
rowfirst
rowlast
rowmax
rowmean
rowmin
rowmiss
rownonmiss
rowsd
rowtotal
sd
seq
skew
std
tag
total
END
LIST func_words
BEGIN
Any count
Any match
Any value
Concatenate
Count of nonmissing values
Cut
Different
Ends (of string)
Fill pattern
Group
Interquartile range
Kurtosis
Median absolute deviation
Maximum
Mean absolute deviation
Mean
Median
Minimum
Mode
Marginal tax rate
Percent (or proportion)
Percentile
Rank
Row first nonmissing value
Row last nonmissing value
Row maximum
Row mean
Row minimum
Row number of missing
Row number of nonmissing
Row standard deviation
Row total
Standard deviation
Sequences (integer)
Skewness
Standardized values
Tag one obs. per group
Total
END
LIST func_change
BEGIN
script anymatch
script anymatch
script anyvalue
script concat
script expNby
script cut
script diff
script ends
script fill
script group
script expNby
script varnNby
script expNby
script expNby
script expNby
script expNby
script expNby
script expNby
script mode
script mtr
script pc
script pctile
script rank
script varLall
script varLall
script varLnum
script varLnum
script varLnum
script varLnum
script rownonmiss
script varLnum
script varLnum
script expNby
script seq
script varnNby
script std
script tag
script expNby
END
/* expNby -- argument is an expression
result is numeric
by is allowed
no options
*/
SCRIPT expNby
BEGIN
script expression_on
script varlist_off
script varname_off
script twovars_off
script numlist_off
program enable_sub
script typeall_off
script typenum_on
script typestr_off
script typebyte_off
script typedoub_off
main.gb_opt.hide
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.hide
END
/* varLall -- argument is a varlist
result is numeric or string
by is not allowed
no options
*/
SCRIPT varLall
BEGIN
script expression_off
script varlist_on
script varname_off
script twovars_off
script numlist_off
program enable_byifin_no_by
script typeall_on
script typenum_off
script typestr_off
script typebyte_off
script typedoub_off
main.gb_opt.hide
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.hide
END
/* varLnum -- argument is a varlist
result is numeric
by is not allowed
no options
*/
SCRIPT varLnum
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_on
script typestr_off
script typebyte_off
script typedoub_off
main.gb_opt.hide
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -