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]

AW: st: How to get the full matrix from "duncan"?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: How to get the full matrix from "duncan"?
Date   Fri, 23 Apr 2010 16:04:54 +0200

<> 

You want to throw in a line turning the returned result into a proper Stata
-matrix-, as in:



*************
sysuse auto, clear
duncan price rep78
mat A=r(D)
mat l A
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von ?? ???
Gesendet: Freitag, 23. April 2010 16:01
An: [email protected]
Betreff: RE: st: How to get the full matrix from "duncan"?

Dear Maarten,

Thank you very much for your reply. I really should have reported the =
version of the program and where I got it from. It was from SSC, and it =
is the program written by Ben Jann. I am sorry for any possible =
confusion that I might have caused.

I could find the matrix r(D) after issuing -return list-, but have no =
idea of how to get that matrix out of Stata. I tried an ado named =
-mat2txt-, also written by Ben Jann and available at SSC, but it seems =
that this program  cannot find r(D).  I thought that my syntax  for =
-mat2txt- was wrong, so I tried it in three ways:=20

mat2txt, matrix(D) saving("/Users/chihayakenji/Desktop/mat.txt")
mat2txt, matrix(r(D)) saving("/Users/chihayakenji/Desktop/mat.txt")
mat2txt, matrix(rD) saving("/Users/chihayakenji/Desktop/mat.txt")

None of them seems to work. Am I doing something wrong with the syntax =
or should I use a different program for that?

Thanks in advance.

Kenji
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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