I am having trouble with st_matrixcolstripe() command with complex column stripe. Parts of the name are getting switched unexpectedly. Here's a trivial example:
The output looks like this (Stata 13.1):
As you can see, the column names I highlighted red are incorrect, at least as far as I can tell. The names before and after the "#" sign are swapped. This is not I expected based on the Stata documentation.
Any ideas or suggestions would be much appreciated!
Thanks,
Keith
Code:
mata: b = (1, 2, 3, 4) b st_matrix("b",b) s = ("eq1", "1.treat#0bn.post" \ "eq1", "1.treat#1.post" \ "eq2", "[email protected]" \ "eq2", "[email protected]" ) s st_matrixcolstripe("b",s) end matrix list b
The output looks like this (Stata 13.1):
Code:
.. mata: ------------------------------------------------- mata (type end to exit) ------------------------------------------------------------------------------------------------------------------- : b = (1, 2, 3, 4) : b 1 2 3 4 +-----------------+ 1 | 1 2 3 4 | +-----------------+ : st_matrix("b",b) : : s = ("eq1", "1.treat#0bn.post" \ "eq1", "1.treat#1.post" \ "eq2", "[email protected]" \ "eq2", "[email protected]" ) : s 1 2 +-----------------------------------------------+ 1 | eq1 1.treat#0bn.post | 2 | eq1 1.treat#1.post | 3 | eq2 [email protected] | 4 | eq2 [email protected] | +-----------------------------------------------+ : st_matrixcolstripe("b",s) : end --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- . matrix list b b[1,4] eq1: eq1: eq2: eq2: 1.treat# 1.treat# 1vs0.treat# 1vs0.treat# 0.post 1.post 0.post 1.post r1 1 2 3 4
Any ideas or suggestions would be much appreciated!
Thanks,
Keith
Comment