📄 _svy_check_cmdopts.ado
字号:
*! version 1.0.1 01apr2005
program _svy_check_cmdopts, sclass
// Common options that -svy- can take over; they are most likely
// ignored anyway.
version 9
syntax name(name=cmdname) [, * ]
// the following options, when specified, will result in an error msg
local badopts SUBpop(passthru) ///
Cluster(passthru) ///
VCE(passthru) ///
Robust ///
// blank
local badnames subpop cluster vce robust
if inlist("`cmdname'","ivreg","regress") {
local badopts `badopts' hc2 hc3 hascons tsscons ///
NOHEader DEPname(passthru) plus beta
local badnames `badnames' hc2 hc3 hasxons tsscons ///
noheader depname plus beta
}
if inlist("`cmdname'","logit","probit") {
local badopts `badopts' NOCOEf
local badnames `badnames' nocoef
}
if inlist("`cmdname'","glm") {
local badopts `badopts' IRLS
local badnames `badnames' irls
}
if inlist("`cmdname'", "heckman") {
local badopts `badopts' TWOstep
local badnames `badnames' twostep
}
// options with side-effects that -svy- needs to be aware of
if "`cmdname'" == "ivreg" {
local first FIRST
}
syntax name(name=cmdname) [, ///
crittype(passthru) ///
SCore(passthru) ///
STRata(passthru) /// see _svy_newrule.ado
PSU(passthru) /// see _svy_newrule.ado
FPC(passthru) /// see _svy_newrule.ado
Log NOLog TRace ///
COEF ///
`badopts' ///
`first' ///
* ///
]
if "`log'`trace'" != "" {
local options `"`log' `nolog' `trace' `options'"'
}
foreach name of local badnames {
if `"``name''"' != "" {
local 0 `", ``name''"'
syntax [, NOT_AN_OPTION ]
}
}
// check for other illegal options; also
// check that the data is -svyset-
_svy_newrule , `strata' `psu' `fpc'
local pseudo intreg /// -ml- cmds
gnbreg ///
heckman ///
heckprob ///
poisson ///
nbreg ///
logit /// built-in cmds
mlogit ///
ologit ///
oprobit ///
probit ///
// blank
if `"`crittype'"' == "" & `: list cmdname in pseudo' {
local crittype crittype("log pseudolikelihood")
}
local cmdopts2 `score' // start fresh
local cmdopts2 `cmdopts2' `crittype'
sreturn clear
sreturn local cmdopts1 `", `options'"'
sreturn local cmdopts2 `"`cmdopts2'"'
sreturn local log `log' `trace'
// special options
if "`cmdname'" == "ivreg" & "`first'" != "" {
sreturn local first first
}
end
exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -