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]

From |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: matrix colnames, Kronecker direct products, and factor variables |

Date |
Wed, 4 Dec 2013 18:54:31 -0500 |

Sorry, you asked about factor names in matrix A. You are quite right that they do not behave like equation names. Whether they *should* is another question. Steve Note that factor variable names are not equation names. The following version (you seem to have switched A & B) produce column names that are a combination of those from A & B. matrix colnames B = eqn1:_new eqn1:_old matrix C = A # B Steve On Dec 4, 2013, at 3:02 PM, Doug Hemken wrote: 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/ * * 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/

**References**:**st: matrix colnames, Kronecker direct products, and factor variables***From:*Doug Hemken <dehemken@wisc.edu>

- Prev by Date:
**Re: st: matrix colnames, Kronecker direct products, and factor variables** - Next by Date:
**Re: st: matrix colnames, Kronecker direct products, and factor variables** - Previous by thread:
**Re: st: matrix colnames, Kronecker direct products, and factor variables** - Next by thread:
**Re: st: matrix colnames, Kronecker direct products, and factor variables** - Index(es):