Statalist


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

st: Matrix command - vecdiag? - Thx


From   [email protected]
To   [email protected]
Subject   st: Matrix command - vecdiag? - Thx
Date   Fri, 7 Sep 2007 20:48:26 -0300 (BRT)

I just would like to thank Kit, Brent and Nick for the valuable help and
comments on my question. Both approaches have worked nicely here and I am
currently running my analyses without problem.

Thank you for your time.

Best,

Tiago





Dear Statalisters,

I have the following do file (and a lot of .dta files):


clear
set obs 100
tempname M
forvalues i = 1/100 {
forvalues u = 1(0.1)1.6  {
	use "C:\TEST\RR=`u'_replication_number_`i'.dta"
	set more off
	quietly summarize A
	matrix `M' = nullmat(`M') \ ( r(mean),  r(N))
        clear
}
}
svmat double `M' , name(results)


-svmat- saves results as:

results1 results2
1.2 56
1.3 85


Nonetheless, I would like to add to the matrix a third collumm, which will
have the name of the .dta file. For example,

results1 results2 results3
1.2 56 RR=1.2_replication_number_1.dta
1.3 85 RR=1.2_replication_number_2.dta
.
.
.

Is this difficult to do without changing much my simple do file? I have
tried the vecdiag option, unsuccessfully, however.

I will be very grateful for any help again.

Best,

Tiago







-- 
Tiago V. Pereira
Heart Institute - InCor
Laboratory of Genetics and Molecular Cardiology,
Department of Biochemistry and Molecular Biology,
Federal University of S�o Paulo.
Av. Dr. Eneas de Carvalho Aguiar, 44;
Cerqueira C�sar - CEP 05403-000
Sao Paulo, SP Brazil.
Tel./fax: +55 11 3069 5068
email:  [email protected]
*
*   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