📄 ml_e2_cycle.ado
字号:
*! version 1.0.0 22apr2003
program define ml_e2_cycle, rclass
version 8.0
args calltype
// no need to check memory requirements
if (`calltype' == -1) exit
local i = $ML_tnqi // index for current technique
local ti : word `i' of $ML_tnql // current technique name
local ki : word `i' of $ML_tnqk // max steps in current technique
local k : word count $ML_tnql // number of techniques
local j = $ML_tnqj // step in current technique
if inlist("`ti'","bfgs","dfp") {
global ML_noinv "noInvert"
}
else global ML_noinv
if "`ti'" == "nr" {
local eval ml_e2
local name = "Newton-Raphson"
}
else {
local eval ml_e1_`ti'
local name = upper("`ti'")
}
if `calltype' > 0 & `j' == 1 {
if $ML_ic == 0 {
di as txt "(setting optimization to `name')"
}
else di as txt "(switching optimization to `name')"
}
// call likelihood evaluator for the current technique
`eval' `calltype'
// next step
if `calltype' > 0 {
global ML_tnqj = mod(`j',`ki')+1
if $ML_tnqj == 1 {
// next technique
global ML_tnqi = mod(`i',`k')+1
}
}
/* Save current Beta and gradient */
if "$ML_noinv" == "" & `calltype' > 0 & !missing(scalar($ML_f)) {
matrix $ML_dfp_b = $ML_b
matrix $ML_dfp_g = $ML_g
}
end
exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -