Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: matrix colnames, Kronecker direct products, and factor variables


From   Doug Hemken <dehemken@wisc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: matrix colnames, Kronecker direct products, and factor variables
Date   Wed, 04 Dec 2013 14:02:41 -0600

I don't get what I expect. The documentation I find says the columns of the product matrix, A # B, will have names from matrix B and equation names from matrix A?

But if I have factor variable names for the columns of A, they simply disappear in the product. (I also notice that when I assign column names that appear to be factor variables or interaction terms, Stata alters my labels, usually for the better.)

For example:
matrix A = (1,21 \ 0 ,1)
matrix colnames A = _cons mpg
matrix B = I(2)
matrix colnames B = 0.foreign 1.foreign


matrix C = B # A
matrix list A
matrix list B
matrix list C


The column labeling on C is not what I expect!
--
Doug Hemken
4226I Social Science Bldg.

dehemken@wisc.edu
262-4327

To make a consulting appointment send me an email, or use the on-line scheduler:
https://calendar.wisc.edu/scheduling-assistant/public/profiles/PlRxCykH.html
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index