Dear All,
is this a correct behaviour?
sysuse auto
svyset [w=weight]
svy: mean price, subpop(if !missing(rep78))
(running mean on estimation sample)
missing() may not be nested within missing()
invalid syntax
r(198);
The help for svy: refers to standard if() description and does not
mention any particular restrictions on the expression specified in
subpop().
Workaround:
tempvar interesting
gen `interesting'=!missing(rep78)
svy: mean price , subpop(if `interesting')
Could that be incorporated into _svy_subpop routine? Currently it fails here:
- quietly replace `subuse' = . if missing(`exp')
= quietly replace __00000T = . if missing(!missing(rep78))
}
markout `touse' `subvar' `subuse'
if "`subvar'" != "" {
quietly replace `subuse' = 0 if `subvar' == 0
}
}
Also, what is the nature of the restriction that missing() does not
allow missing() inside it? Say, I want to check "if
missing(X/missing(Z))" . I know I can always regroup it so that there
is only one missing() is used, but I don't see the point.
Thank you,
Sergiy Radyakin
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/