📄 mds_p.dlg
字号:
/*
predict (after mds)
*! VERSION 1.0.0 17mar2005
*/
VERSION 9.0
INCLUDE _std_large
INCLUDE _ht320
INCLUDE header
HELP hlp1, view("help mds postestimation")
RESET res1
SCRIPT PREINIT
BEGIN
main.ed_cmd.hide
create BOOLEAN mds_p_saving_required
mds_p_saving_required.setfalse
END
PROGRAM POSTINIT_PROGRAM
BEGIN
if ! (main.ed_cmd.equals("mds") | main.ed_cmd.equals("mdsmat") | main.ed_cmd.equals("mdslong")) {
stopbox note "This dialog requires that one of the multidimensional scaling commands" ///
"(mds, mdsmat, or mdslong) be performed prior to starting." " " ///
`"Use the "Reset" (R) button on this dialog once that has been done."'
}
END
DIALOG main, label("predict - Prediction after estimation") tabtitle("Main")
BEGIN
// e(cmd) indicates which estimation command was run before predict
EDIT ed_cmd 0 0 0 0, ///
default(e(cmd))
TEXT tx_var _lft _top _vlwd ., ///
label("New variable names:")
EDIT ed_var @ _ss @ ., ///
label("New variable names")
TEXT tx_type _vlsep _top _vnwd ., ///
label("New variable type:")
COMBOBOX cb_type @ _ss _vnwd ., ///
label("Type") dropdownlist contents(type) default(c(type))
GROUPBOX gb_produce _lft _ls _iwd _ht4, ///
label("Produce:")
RADIO rb_config _indent _ss _ibwd ., first ///
option(config) onclickon(program report_opt) ///
label("Variables containing the approximating configuration in Euclidean space")
RADIO rb_pairwise @ _ss @ ., last ///
option(pairwise) onclickon(program report_opt) ///
label("Dissimilarities, approximating Euclidean distances, and raw residuals")
GROUPBOX gb_save _lft _xls _iwd _ht4, ///
label("Save as dataset on disk")
TEXT tx_sav _indent _ss _ibwd ., ///
label("Filename:")
FILE fi_sav @ _ss @ ., ///
label("Browse...") ///
option(saving) ///
filter("Stata Dataset (*.dta)|*.dta|All (*.*)|*.*") ///
defext(dta) ///
save ///
error("Filename for saving dataset to disk")
GROUPBOX gb_opts _lft _xls _iwd _ht4h, ///
label("Options")
CHECKBOX ck_notransform _ilft _ss _ibwd ., ///
option(notransform) label("Suppress linear transformation of the dissimilarities")
CHECKBOX ck_full @ _ms @ ., ///
option(full) label("Create predictions for all pairs of objects")
END
INCLUDE ifin
INCLUDE _type_list_fd
PROGRAM report_opt
BEGIN
if main.ed_cmd.iseq("mds") {
if main.rb_pairwise {
call main.gb_save.setlabel "Save as dataset on disk (required)"
call mds_p_saving_required.settrue
}
if main.rb_config {
call main.gb_save.setlabel "Save as dataset on disk"
call mds_p_saving_required.setfalse
}
}
if main.ed_cmd.iseq("mdsmat") {
call main.gb_save.setlabel "Save as dataset on disk (required)"
call mds_p_saving_required.settrue
}
if main.ed_cmd.iseq("mdslong") {
if main.rb_config {
call main.gb_save.setlabel "Save as dataset on disk (required)"
call mds_p_saving_required.settrue
}
if main.rb_pairwise {
call main.gb_save.setlabel "Save as dataset on disk"
call mds_p_saving_required.setfalse
}
}
if main.rb_config {
call main.ck_notransform.disable
call main.tx_var.setlabel "New variable names:"
}
if main.rb_pairwise {
call main.ck_notransform.enable
call main.tx_var.setlabel "New variable names: (requires three)"
}
END
PROGRAM command
BEGIN
put "predict "
require main.ed_var
if ! main.cb_type.isdefault() {
put main.cb_type " " "("
put main.ed_var
put ") "
}
if main.cb_type.isdefault() {
put " " main.ed_var " "
}
INCLUDE _ifin_pr
beginoptions
option main.rb_config
option main.rb_pairwise
if mds_p_saving_required {
require main.fi_sav
}
if main.fi_sav {
repfile main.fi_sav
put "saving("
put main.fi_sav
put ") replace "
}
option main.ck_notransform
option main.ck_full
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -