[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Data Analytics Corp." <dataanalytics@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Matrix help |

Date |
Wed, 21 May 2008 10:52:05 -0400 |

I knew about the local statement, but I didn't know about di "`rownames'" Thanks Nick Cox wrote:

. Following the link at the bottom of the help to -help matmacfunc- leads

you to the answer you seek.

sysuse auto, clear

regress mpg weight price

local rownames : rownames e(V) di "`rownames'"

Nick

n.j.cox@durham.ac.uk

Data Analytics Corp.

But doesn't

matrix rownames

set and reset the names? I want to retrieve them and use them as a variable in a new matrix that I want to append to yet another matrix.

Nick Cox wrote:

. . help matrix rownames

Nick

n.j.cox@durham.ac.uk

Data Analytics Corp.

I used the mat_rapp command this morning - worked perfectly, and saved

me time. I have another question, if I may. How do you retrieve the row names and use them in the matrix M=J(n,m,value) command? Any examples of retrieving the names from, say, e(TR)?e(TC)

Sergiy Radyakin wrote:

matrix M=J(n,m,value) will create a matrix size nxm filled with value"value".

you will need it to create the column identifying source.

mat_capp M : M1 M2 will stitch two matrices together taking columns

from M1 then from M2 and storing them in M. You will need it to put

the id-column into your matrices

mat_rapp M : M1 M2 will stitch two matrices together taking rows from

M1 them from M2 and storing them in M. . You will need it to combine

e(TR) and e(TC).

net search matrix save

will return a number of commands to export matrices. choose one that

produces output in a suitable format.

On 5/20/08, Data Analytics Corp. <dataanalytics@earthlink.net> wrote:

exportI just ran a simple correspondence analysis and I would now like to

the twothe coordinates to another program In particular, I'd like to stack

matrices of coordinates contained in e(TR) (which is R x J) and

+1)(which

valuesis C x J) into one matrix, add a column identifying the source (with

say, a 1 for e(TR) and 2 for e(TC)), resulting in an (R + C) x (j

*matrix, and then export the matrix, with rownames, to an ASCII

comma-separated file. Can this be done and how?

* For searches and help try:

* http://www.stata.com/support/faqs/res/findit.html

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

-- ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 ________________________ (V) 609-936-8999 (F) 609-936-3733 dataanalytics@earthlink.net www.dataanalyticscorp.com * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Matrix help***From:*"Data Analytics Corp." <dataanalytics@earthlink.net>

**Re: st: Matrix help***From:*"Sergiy Radyakin" <serjradyakin@gmail.com>

**Re: st: Matrix help***From:*"Data Analytics Corp." <dataanalytics@earthlink.net>

**RE: st: Matrix help***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: Matrix help***From:*"Data Analytics Corp." <dataanalytics@earthlink.net>

**RE: st: Matrix help***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: duration data: stock sampling** - Next by Date:
**Re: st: -merge- which one would make sense?** - Previous by thread:
**RE: st: Matrix help** - Next by thread:
**st: thank you** - Index(es):

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