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 at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: Problem creating large matrices


From   "Achilleas Vassilopoulos" <axivas@yahoo.gr>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: AW: Problem creating large matrices
Date   Mon, 12 Jul 2010 21:46:19 +0300

Dear Martin,

Thank you for your immediate response. I want to save the results in a
matrix so then I can 'svmat' them and take mean and SE of my estimation.
Your mata command seems to work perfectly in creating this huge matrices but
since I'm not at all familiar with mata I have 2 additional question to you
and who else knows: 

1) If I'm able to use the 'svmat' command in matrices created in mata?
2) how can I assign r() or e() values to the rows of such matrices

To give a very naive example of what I want to estimate, consider that I'm
interested on the mean (avgbeta) and the SE (bse) of the beta coefficients
of  a simple regression ran 160000, my code would be :

matrix beta = J(160000,1,0)

forvalues i=1/160000 {

reg y x
matrix beta [`i',1] = e(b)
}

svmat beta
qui sum beta1
local avgbeta = r(mean)
local bse = r(sd)
 
_____________ - _______________

Achilleas Vassilopoulos

Agricultural University of Athens,
Dept. of Agricultural Economics and Rural Development,
Lab. of Political Economy and European Integration.
Iera Odos 75, 11855, Athens, Greece

Tel: (+30) 210-5294726
Fax: (+30) 2105294786
e-mail: avassilopoulos.aua@gmail.com

-----Original Message-----


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