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

st: speeding up program that uses mkmat (thanks to Nick and Kit!)


From   Elizabeth Bruch <[email protected]>
To   [email protected]
Subject   st: speeding up program that uses mkmat (thanks to Nick and Kit!)
Date   Sun, 06 Feb 2005 15:07:26 -0800

Based on Nick's comments, I worked to minimize the number of times I used
the "mkmat" command. I did this by combining subsets of observations into
larger matrices, and then generated sub-matrices for each observation. This
meant that I only needed to use "mkmat" 24 times, rather than 2500 times. I
ended up creating a lot of sub-matrices, but this was still far faster than
using mkmat.

Then I used Kit's (revised) mkmat2 to speed up the mkmat subroutine.

Together these changes resulted in an enormous increase in speed. Thanks
again!

Elizabeth

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