I have been informed (by Dan Blanchette of the University of North
Carolina) that the -svymean- command has the feature that the estimation
results -e(b)- and -e(V)- do not always contain the estimates and the
covariance matrix of the estimates, respectively. This worries me, because,
in writing my -parmest- package, I have assumed that -e(b)- always contains
the estimates, and that -e(V)- always contains the covariance estimates. If
this assumption is false, then -parmest- will either crash or give the
wrong results.
An example of this feature was found by Dan Blanchette in the -auto- data,
in which both -e(b)- and -e(V)- can be 1x1 matrices of zeros in the
presence of user-inserted missing values in the data. I have reproduced
this example below. As it happens, the feature can be fixed by including
the -complete- option of -svymean-, and I have also reproduced this below.
However, it is surprising that there are any -eclass- commands at all for
which -e(b)- and -e(V)- are not the estimates and their covariance,
respectively. Is this feature of -svymean- supposed to be there? And, if
so, what is Stata's true policy on estimation results, so I can think of a
way for -parmest- to work around it (or warn users in the .hlp file)?
Thanks in advance
Roger
. **** Without -complete- ****
. use c:\stata\auto,clear
(1978 Automobile Data)
. replace mpg=. if rep78==1
(2 real changes made, 2 to missing)
. svymean mpg weight,by(foreign)
Survey mean estimation
pweight: <none> Number of obs(*) = 74
Strata: <one> Number of strata = 1
PSU: <observations> Number of PSUs = 74
Population size = 74
--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Opinions expressed are those of the author, not the institution.