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

st: different behavior of -rownumb()- function in Stata 11 and Stata 10 (9, 8)

From   Zurab Sajaia <[email protected]>
To   statalist <[email protected]>
Subject   st: different behavior of -rownumb()- function in Stata 11 and Stata 10 (9, 8)
Date   Thu, 7 Jan 2010 20:28:07 -0500

Dear all,
I've noticed that the behavior of -rownumb()- function has changed in the version 11 compared to the previous versions and was wandering whether this is a bug or an intentional modification.
here's an example: 
   matrix M = 1 \ 2 \ 3 \ 4 \ 5
   matrix rownames M = "b" "c" "1:a" "1:b" "1:c"
   matrix list M
Basically I want to distinguish rows with a same name but different equation names (including one with and another without equation name). 
So I search for with a full name:
.display rownumb(M, "1:b")
.display rownumb(M, ":b")
to get 4 in the first case and 1 in the second. 
If I search for "a"
.display rownumb(M, "1:a")
returns 3 and I'd expect (and until Stata 11 this was true) 
.display rownumb(M, ":a")
would return missing because there is no row with an empty equation name and row name "a". 
But Stata in Stata 11 I again get 3, so as it comes out Stata 11 doesn't distinguish between these two cases (as did the previous versions):
.display rownumb(M, "a")  // any row with a name "a", in our case 3, and
.display rownumb(M, ":a") // row with an empty eqname and rowname "a" - in our case not found.
Any ideas what's going on here?
*   For searches and help try:

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