Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Strange behavior or bug? - svy : total returns different results in Stata versons 9, 10 and 11


From   Zurab Sajaia <zsajaia@hotmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Strange behavior or bug? - svy : total returns different results in Stata versons 9, 10 and 11
Date   Fri, 28 Aug 2009 13:33:20 -0400

Dear all,
 
I've encountered a strange behavior of -svy- commands and was wandering whether this is a bug or I'm doing something wrong, any thought would be greatly appreciated.
 
the setup:
 
sysuse auto, clear
svyset [pw = weight]
 
generate mv = .
 
svy : total mv
 
all versions (I have) of Stata (9-11) return -no observation- error after this.
 
 
but if we change weights:
 
replace weight = 0 in 1/5  // there might be other explanation but I found that this 
                           // error happens only if I have some observations with zero weights
 
then Stata 9 still shows error 2000 but both 10 and 11 versions return an output with "(sum of weights equals zero)" message on the screen and e(b) matrix equal to 0.
 
 
Has anyone else encountered the similar thing?
Thanks,
Zurab
 
 
 
 
 
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index