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

RE: st: RE: Label instead of var names in a matrix


From   "Herve STOLOWY" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Label instead of var names in a matrix
Date   Sat, 18 Dec 2004 09:45:06 +0100

Dear Nick:

I have excellent news. I tried all your suggestions and everything
worked. In summary:

The addition of the quotes in:

capture matrix rownames statdes = "`label'" 

solves the problem and replaces all varnames by labels.

But I by far prefer your second solution with makematrix. This is my
final coding:

makematrix c1, from(r(N) r(mean) r(sd)) label : summarize size1 lev2
sales_int3
makematrix c2, from(r(chi2) r(P_chi2))  : sktest size1 lev2 sales_int3
matrix c3 = c1 , c2
mat2txt, matrix(c3) saving(statdes) replace
makematrix c4, from(r(N) r(mean)) label : summarize auditor_d
standards_d for_list
mat2txt, matrix(c4) saving(statdes) append

-makematrix- followed by -mat2txt- are tremendous commands. 

I also discovered that I can use the same commands after a factor
analysis. It's really nice.

Best regards (and thanks again).

Herv�
***********************************************************
HEC Paris
D�partement Comptabilit� Contr�le de gestion / Dept of Accounting and
Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42
Fax: +33 1 39 67 70 86
[email protected]
http://campus.hec.fr/profs/stolowy/perso/home.htm
>>> [email protected] 12/17/04 1:17 PM >>>
Rather 

matrix c3 = c1, c2 

Nick 
[email protected] 

> -----Original Message-----
> From: Nick Cox 
> Sent: 17 December 2004 11:03
> To: '[email protected]'
> Subject: RE: st: RE: Label instead of var names in a matrix
> 
> 
> You can also do most of what you want without 
> programming: 
> 
> ssc inst makematrix 
> makematrix c2 , from(r(chi2) r(P_chi2))  : sktest size1 lev2 
> sales_int3
> makematrix c1 , from(r(N) r(mean) r(sd)) label : su size1 
> lev2 sales_int3
> matrix c3 = c2 , c1 
> 

*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index