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

st: Re: Makematrix- Possible title of the matrix?


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Makematrix- Possible title of the matrix?
Date   Thu, 24 Mar 2005 08:30:03 -0500

How about using the title option in mat2txt?

Michael Blasnik
michael.blasnik@verizon.net

----- Original Message ----- From: "Herve STOLOWY" <stolowy@hec.fr>
To: <statalist@hsphsun2.harvard.edu>
Sent: Thursday, March 24, 2005 7:04 AM
Subject: st: Makematrix- Possible title of the matrix?



Dear All:

I use the -makematrix- command -followed by -mat2txt- to produce tables of descriptive statistics.

It works perfectly with the following command:

makematrix c1, from(r(N) r(mean) r(sd))label : univar var1 var2 var3 var4 if president==1
makematrix c2, from(r(N) r(mean) r(sd)) label : univar var1 var2 var3 var4 if president==0
makematrix c3, from(r(z) 2*normprob(-abs(r(z)))) label : ranksum var1 var2 var3 var4 , by(indep)
matrix c4 = c1 , c2, c3
matrix colnames c4 = N "Mean" "Standard deviation" N "Mean" "Standard deviation" "Mann-Whitney U-test (Z)" "Mann-Whitney U-test (p-value)"
mat2txt, matrix(c4) saving(stat_formation_metier) append

I only have a little question: I append several tables (I rerun the same command replacing "president" by other variables) and there is no way to distinguish the content of each table without remembering the origin of the computation.

I searched in the help for -makematrix- and did not find a possibility to give a title to each table (the c4 matrix in my example). It would be nice to have a title in the upper-left cell of the table, for example "President", in the same column as the variables names.

Do you think this could be possible?

Best regards

Hervé Stolowy
*
*   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/



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