Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Matrix Kronecker Product Question

From   "Michael Blasnik" <>
To   <>
Subject   st: Re: Matrix Kronecker Product Question
Date   Wed, 28 Sep 2005 16:00:31 -0400

I think you might want to check out help matrix rownames. Maybe
mat coleq a=:

will do what you want

Michael Blasnik

----- Original Message ----- From: "Ed Blackburne" <>
To: <>
Sent: Wednesday, September 28, 2005 2:57 PM
Subject: st: Matrix Kronecker Product Question

I previously posted a question regarding matrix colnames and have
received no response.

To help those able to help me, I have narrowed down the problem.

Here is a snippet of code you can run to verify my problem:

************************Beginning of code******************
matrix a=(1,2 \ 3,4)
matrix colnames a= col1 col2
matrix rownames a= row1 row2
matrix li a

local cname: colnames a
local rname: rownames a
matrix aPa=(a'*a)

matrix aPa=aPa#J(1,1,1)

matrix li aPa

matrix rownames aPa=`rname'
matrix colnames aPa=`cname'

matrix li aPa
matrix coleq aPa=""
matrix roweq aPa=""

matrix li aPa

*************************End of code***********************

It appears that after calculating a Kronecker product, the matrix aPa
has equation names in the matrix (I know these are actually r/c
identifiers from the J matrix) that I can't get rid of.

How do I fix this?

*   For searches and help try:

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