Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: -univar-, condition on a string variable and Stata 11


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: -univar-, condition on a string variable and Stata 11
Date   Tue, 16 Mar 2010 18:46:49 -0000

You may have used -univar- with success under Stata 10 but this bug has
been lying there for years waiting to bite you. It's not the change to
Stata 11 that is to blame for anything. Today it got you. 

The problem diagnosis and solution are documented in 

"Why does a program defined by an ado-file sometimes not work when given
a string comparison?"
<http://www.stata.com/support/faqs/lang/define.html>          

However, it is easier to update your code by downloading from the STB-51
archives. The version on SSC is out-of-date. 

Nick 
n.j.cox@durham.ac.uk 

Herve STOLOWY

I have a strange phenomenon with -univar- (downloadable from ssc).

I run the following command and get an error message

univar time_lag if  decision_editoriale!="Reject"
Reject not found
r(111);

decision_editoriale is a string variable.

I am almost sure that I used this command many times with Stata 10
without any problem.

When I use -summarize-, I have no problem.

. su time_lag if  decision_editoriale!="Reject"

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    time_lag |        20       80.65    23.74708         42        137

Would you have any idea?

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