Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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" <>
To   <>
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


-----Ursprüngliche Nachricht-----
[] Im Auftrag von ?? ???
Gesendet: Freitag, 23. April 2010 16:01
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.

*   For searches and help try:

*   For searches and help try:

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