Statalist


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

st: Bug in -test- after -estimates restore- ?


From   Antoine Terracol <terracol@univ-paris1.fr>
To   statalist@hsphsun2.harvard.edu
Subject   st: Bug in -test- after -estimates restore- ?
Date   Fri, 04 Dec 2009 19:19:27 +0100

Dear _all,

I think I found a bug in -test- when using -restore-d estimates when the original dataset has been -clear-ed:

. sysuse auto, clear
(1978 Automobile Data)

. reg price mpg weight
<snip>

. estimates store a

. clear

. estimates restore a
(results a are active now)

. test mpg

 ( 1)  mpg = 0

       F(  1,    71) =    0.33
            Prob > F =    0.5673

. test mpg=0
mpg not found
r(111);


when -test-ing against a given value, Stata gives an error if the variable being tested is absent from the dataset.

Now if I

. gen mpg=.

. test mpg=0

 ( 1)  mpg = 0

       F(  1,    71) =    0.33
            Prob > F =    0.5673


If a variable with the "correct" name is present, -test- works again as expected

Antoine

*
*   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