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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: STATA 12 very slow compared to STATA 10


From   Sara Borelli <saraborelli77@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: STATA 12 very slow compared to STATA 10
Date   Tue, 12 Mar 2013 09:40:38 -0400

Hi Martin
you are right, I did not ask the question correctly. I thought there
was maybe a common problem for STATA 12 being slow in general that
others might have encountered. I apologize for that

I write here below an extract of the program I am running. If you have
any insight of what is going wrong I would really appreciate it. I
also tried to run the entire program using "version 10" at the
beginning of the do file, but it is still very slow
I let the program run all night but is still not done. When I was
using STATA 10 it was taking only 15 minutes overall


before this "mat define" command line I am running some glm estimation
that works at usual speed

mat define P=J(618,1,.)

set seed 55982264

forvalues x=1/500 {

mat define BS_r`x'=J(618,1,.)

use data1
for each var of varlist v1 v2 v3 v4 ....v10 {
bsample
mkmat `var', mat(Z_`var'_r`x')
mat BS_r`x'=BS_r`x',Z_`var'_r`x'
}
drop v1-v10
svmat BS_r`x', names(col)
gen id=_n
save BS_r`x', replace

use data2, clear
gen id=_n
mmerge id using BS_r`x'
save replication `x'
predict prediction`x'
mkmat prediction`x', mat(P_`x')
mat P=P, P_`x'
}

It seem to run smoothly until the "predict", but seems to get slow at
the time of running the command  mkmat prediction`x', mat(P_`x')

thanks for any insight you might have

Sara



On Tue, Mar 12, 2013 at 5:56 AM, Maarten Buis <maartenlbuis@gmail.com> wrote:
> On Mon, Mar 11, 2013 at 10:11 PM, Sara Borelli wrote:
>> some time ago I wrote a do file to perform sampling and other data
>> manipulations, data matrix operations and so. <snip>
>> My company switched to STATA 12 recently, and it is taking one hour
>> only for the first 100 replications.
>> Does anyone has any idea of what may be slowing things down so much?
>
> Try to imagine you are someone who wants to answer your question. What
> that persons sees is: I did some stuff and it is slower in Stata 12
> than in Stata 10, why? What would your answer be? My answer is: it
> depends on what "stuff" is.
>
> -- Maarten
>
> ---------------------------------
> Maarten L. Buis
> WZB
> Reichpietschufer 50
> 10785 Berlin
> Germany
>
> http://www.maartenbuis.nl
> ---------------------------------
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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