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 on April 23, and its replacement, 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" <>
To   <>
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?"

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



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

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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index