📄 mlopts.ado
字号:
*! version 7.1.3 27feb2005
program mlopts, sclass
/*
Syntax: mlopts <lmacname> [<lmacname>] [, <options> ]
Examples: mlopts mlopts, `options'
mlopts mlopts options, `options'
*/
version 8.0
local maxoptlist ///
MLOPTs(string) ///
TRace ///
GRADient ///
HESSian ///
SHOWSTEP ///
ITERate(int -1) ///
TOLerance(real -1) ///
LTOLerance(real -1) ///
GTOLerance(real -1) ///
NONRTOLerance ///
SHOWNRtolerance ///
NRTOLerance(real -1) ///
DIFficult ///
CONSTraints(string) ///
TECHnique(passthru) ///
VCE(passthru) ///
// blank
syntax namelist(id="macro names" min=1 max=2) [, `maxoptlist' * ]
gettoken dest rest : namelist
if "`rest'" == "" {
syntax namelist [, `maxoptlist' ]
}
// maximize options
local mlopts `mlopts' ///
`trace' ///
`gradient' ///
`hessian' ///
`showstep' ///
`difficult' ///
`nonrtolerance' ///
`shownrtolerance' ///
// blank
if `tolerance'!= -1 {
local tol "tolerance(`tolerance')"
}
if `ltolerance' != -1 {
local ltol "ltolerance(`ltolerance')"
}
if `gtolerance' != -1 {
local gtol "gtolerance(`gtolerance')"
}
if `nrtolerance' != -1 {
local nrtol "nrtolerance(`nrtolerance')"
}
if `iterate' != -1 {
local iter "iterate(`iterate')"
}
sreturn clear
if "`technique'`vce'" != "" {
ml_technique, `technique' `vce' nodefault
if `"`s(technique)'"' != "" {
local technique "technique(`s(technique)')"
}
if "`s(vce)'" != "" {
local vce "vce(`s(vce)')"
}
sreturn local technique "`technique'"
sreturn local vce "`vce'"
}
if "`constraints'" != "" {
capture confirm name `constraints'
if _rc {
CheckClist constraints , constraints(`constraints')
}
else {
CheckCmat `constraints'
}
local const "constraints(`constraints')"
sreturn local constraints "`constraints'"
}
c_local `dest' `mlopts' `tol' `ltol' `gtol' `nrtol' `iter' ///
`const' `technique' `vce'
// other options
if "`rest'" != "" {
c_local `rest' `"`options'"'
}
end
program CheckClist
syntax name , constraints(numlist integer)
c_local `namelist' `constraints'
end
program CheckCmat
args mat
confirm matrix `mat'
end
exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -